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

Configurable cache namespace #231

Open
Ksnz opened this issue Oct 12, 2021 · 2 comments
Open

Configurable cache namespace #231

Ksnz opened this issue Oct 12, 2021 · 2 comments

Comments

@Ksnz
Copy link

Ksnz commented Oct 12, 2021

Feature description

If we have different applications with same cache name and same Redis instance it may cause incorrect behavior of mixing different caches.
I think it would be nice to have an option for cache config like a namespace.
Or using application name as namespace prefix by default.

@jfsanchez91
Copy link
Contributor

I guess you can set manually this prefix, just use the application name as a prefix for your cache names.

@Ksnz
Copy link
Author

Ksnz commented Feb 18, 2023

Yes but what if cache configuration is hardcoded as part of some business logic?
Like

@Named(SomeStuffCacheConfiguration.CACHE_NAME)
@ConfigurationProperties(CacheConfiguration.PREFIX + "." + SomeStuffCacheConfiguration.CACHE_NAME)
public class SomeStuffCacheConfiguration extends CacheConfiguration [
public static final String CACHE_NAME = "some-stuff-cache";

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

No branches or pull requests

2 participants