-
Notifications
You must be signed in to change notification settings - Fork 41.2k
CacheAutoConfiguration triggers early initialization of cache components #13038
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
Comments
This commit restructures the Cache auto-configuration to avoid an early init on CacheManager (and potentially all its infrastructure). Rather than adding a dependency on the validator bean, this commit relies on the fact CacheAspectSupport checks if a CacheManager is available in the afterSingletonsInstantiated callback. In this case, a simple bean with a postconstruct callback is enough. Closes spring-projectsgh-13038
Hi, has this fix been merged to 2.0.2.RELEASE? thanks |
@jtktam if you click on the link above your comment, it states in which tags the fix is included. Yes, it's included (we always merge forward so whatever is in |
I think I am still running into the early initialization bug in 2.0.2.RELEASE, that's why i wanted to confirm it's merged forward |
@jtktam we don't use the tracker for questions (see the guidelines for contributing). Feel free to come chat with us on Gitter. |
While working on a feature to demonstrate how to swap a
CacheManager
in a BPP, I found that the cache auto-configuration was triggering early initializations.This basically boil down to
CacheManagerValidator
whose purpose is to throw an exception "early enough" if noCacheManager
could be auto-configured. Removing that locally was enough to fix the problemThe text was updated successfully, but these errors were encountered: