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

Auto-configure cache infrastructure to use a CacheResolver bean if present #41644

Closed
Crain-32 opened this issue Jul 29, 2024 · 2 comments
Closed
Labels
status: declined A suggestion or change that we don't feel we should currently apply

Comments

@Crain-32
Copy link

This can be seen an extension of this conversation from Framework, which I originally posted thinking I was in Spring Boot's Issues (I've checked 5 times that this is Boot already while writing this)

Currently Spring Boot's Autoconfiguration will handle if you provide a CacheManager Bean, however won't handle if you provide a CacheResolver bean. Both beans should like either require CachingConfigurer, or not. Currently it's one requires it, the other doesn't.

@Crain-32 Crain-32 changed the title Spring Cache Configuration Changes Spring Cache AuthConfiguration Adjustment Jul 29, 2024
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 29, 2024
@snicoll snicoll changed the title Spring Cache AuthConfiguration Adjustment Auto-configure cache infrastructure to use a CacheResolver bean if present Jul 30, 2024
@snicoll
Copy link
Member

snicoll commented Jul 30, 2024

This is a fair point. The reason why this happens this way stems in framework. If you provide a CacheManager bean we will use that. For any other advanced configuration, the configurer is required. I am not sure this should be fixed here, actually, even if we already provided implementations of configurer in the past for convenience.

I'll check what our options are.

@snicoll
Copy link
Member

snicoll commented Jul 31, 2024

Looking at the auto-configuration, and #5201 in particular, I think there's not much we can do at this point.

CacheResolver is an advanced SPI and anything we'd do to automatically wrap it could break others. Thanks for the suggestion, in any case.

@snicoll snicoll closed this as not planned Won't fix, can't repro, duplicate, stale Jul 31, 2024
@snicoll snicoll added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

No branches or pull requests

3 participants