Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redis caching instead of File cache #336

Open
cristianowa opened this issue Dec 6, 2024 · 2 comments
Open

Redis caching instead of File cache #336

cristianowa opened this issue Dec 6, 2024 · 2 comments
Assignees

Comments

@cristianowa
Copy link

Is your feature request related to a problem? Please describe.
We used File Cache in a Docker image with read-only enabled.
This lead to an error when starting the application.
We tweaked the Dockerfile so that directory is writeable, but we wondered if could use another caching system - our system already has Redis available.
Moreover, a common cache could help improving performance.

Describe the solution you'd like
Extend the BaseCache to RedisCache, receiving Redis URL and credentials when instantiating the class.

Describe alternatives you've considered
Extending locally the class and consuming it. It works, but it seems something someone else could use as well.

@FredrikOseberg FredrikOseberg moved this from New to Investigating in Issues and PRs Dec 10, 2024
@FredrikOseberg FredrikOseberg self-assigned this Dec 10, 2024
@FredrikOseberg
Copy link
Collaborator

@cristianowa

I think you can replace the file cache with your own implementation: https://gh.getunleash.io/unleash-client-python/customcache.html

Does that solve your problem?

@cristianowa
Copy link
Author

@FredrikOseberg It will solve my project and that is my plan.

My question is:
Is it worth having other cache types available in the package aside from Filecache?

Basically, I want to save the work I'm having implementing the custom cache for Redis for other people.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Investigating
Development

No branches or pull requests

2 participants