dify icon indicating copy to clipboard operation
dify copied to clipboard

When using redis cluster for caching, add global_prefix to all keys cached by redis

Open berg-wang opened this issue 11 months ago • 1 comments

Self Checks

  • [x] I have searched for existing issues search for existing issues, including closed ones.
  • [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [x] Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

The redis cluster we used is used by various business applications to distinguish and manage the cached data of different projects by setting key prefixes for different projects. We now need to configure dify to use our redis cluster, and we want dify to also be able to add a global prefix to differentiate its cached data from other projects. For example, when I set global_prefix to "dify-ai:", all the keys stored by the dify project in redis cluster are under the 'dify-ai:' key

2. Additional context or comments

No response

3. Can you help us with this feature?

  • [x] I am interested in contributing to this feature.

berg-wang avatar Feb 12 '25 09:02 berg-wang

Hi, @berg-wang. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • Proposal to add a global prefix feature for Redis keys to differentiate cached data.
  • Suggested prefix example: "dify-ai:" for all keys in a Redis cluster.
  • You expressed interest in contributing to this feature's development.
  • No further comments or activities have been made on this issue.

Next Steps:

  • Please confirm if this issue is still relevant to the latest version of the Dify repository by commenting here.
  • If there is no response, the issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

dosubot[bot] avatar Mar 15 '25 16:03 dosubot[bot]

this issue has been solved :https://github.com/langgenius/dify/pull/13652

Can these changes be merged into the main branch?

berg-wang avatar Mar 26 '25 03:03 berg-wang

Thank you for your response, @berg-wang! We're glad to hear that this issue has been resolved with your pull request. We'll go ahead and close this issue now.

dosubot[bot] avatar Mar 26 '25 03:03 dosubot[bot]