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
Support for custom cache registration in CaffeineCacheManager #25230
Comments
I suppose we could alternatively introduce dedicated registration methods for individual caches, e.g. taking cache name plus cache specification, or potentially taking a callback for creating the native cache instance... I'd rather make the use case first-class than expose the inner map here, e.g.: If you'd like full control of individual caches, you could also use |
I like the idea with |
I've just implemented such a Alright, I'll roll this into 5.2.8 right away if this matches your use case as well :-) |
Awesome! Thanks for doing this so fast. 🍺 |
Hi. Is there a way I can get the generics in place while attempting to registerCustomCache(spring), something like : |
Affects: 5.2.6
It is quite common to have multiple caches with different value lifetime. Right now CaffeineCacheManager creates every Cache with the default settings or the settings set through either of setCacheLoader, setCacheSpecification or setCaffeineSpec. But those settings apply to all Caches.
If cacheMap would be exposed (maybe just a simple getter) it would be possible to add prebuilt caches with custom settings to it.
The text was updated successfully, but these errors were encountered: