이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 8. Using Redis Cache with dynamic plugins


You can use the Redis cache store to improve RHDH performance and reliability. Plugins in RHDH receive dedicated cache connections, which are powered by Keyv.

8.1. Installing Redis Cache in Red Hat Developer Hub

Prerequisites

  • You have installed Red Hat Developer Hub by using either the Operator or Helm chart.
  • You have an active Redis server. For more information on setting up an external Redis server, see the Redis official documentation.

Procedure

Add the following code to your app-config.yaml file:

backend:
  cache:
    store: redis
    connection: redis://user:pass@cache.example.com:6379
    useRedisSets: true

8.2. Configuring Redis Cache in Red Hat Developer Hub

8.2.1. useRedisSets

The useRedisSets option lets you decide whether to use Redis sets for key management. By default, this option is set to true.

When useRedisSets is enabled (true):

  • A namespace for the Redis sets is created, and all generated keys are added to that namespace, enabling group management of the keys.
  • When a key is deleted, it’s removed from the main storage and the Redis set.
  • When using the clear function to delete all keys, every key in the Redis set is checked for deletion, and the set itself is also removed.
Note

In high-performance scenarios, enabling useRedisSets can result in memory leaks. If you are running a high-performance application or service, you must set useRedisSets to false.

When you set useRedisSets to false, the keys are handled individually and Redis sets are not utilized. This configuration might lead to performance issues in production when using the clear function, as it requires iterating over all keys for deletion.

Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.