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

Spring Cache support for Async Caffeine #26713

Closed
namila007 opened this issue Mar 22, 2021 · 3 comments
Closed

Spring Cache support for Async Caffeine #26713

namila007 opened this issue Mar 22, 2021 · 3 comments
Labels
for: stackoverflow A question that's better suited to stackoverflow.com

Comments

@namila007
Copy link

namila007 commented Mar 22, 2021

Hi,

I'm currently using Caffeine with Spring Caffeine cache support implementation. I want to know is there any support for Async LoadingCache support on the spring cache? or if I want async caching do I want to move out with AsyncLoadingCache without spring caffeine cache support;?
PS: I'm using spring-webflux

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Mar 22, 2021
@snicoll
Copy link
Member

snicoll commented Mar 22, 2021

Support for LoadingCache has been discussed several times in the past, see for instance #25173. Reactive types are not yet supported, see #17920. If you are using the annotation model, loading cache does not make much sense. If you are using the Cache API directly, the contract is blocking at the moment so not a great fit for a reactive app.

Going forward, please ask questions on StackOverflow, as mentioned in the guidelines for contributing, we prefer to use the issue tracker only for bugs and enhancements.

@snicoll snicoll closed this as completed Mar 22, 2021
@snicoll snicoll added for: stackoverflow A question that's better suited to stackoverflow.com and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Mar 22, 2021
@ben-manes
Copy link
Contributor

@snicoll fyi in case you weren't familiar or forgot, given everything you work on, Caffeine also offers an AsyncCache interface for reactive applications. This stores and returns CompletableFuture values, which Reactor can convert between easily enough. In these cases when users should use the native apis directly, that interface is the best fit.

@snicoll
Copy link
Member

snicoll commented Mar 22, 2021

@ben-manes thanks for following up. I am aware, but the question above was about the Spring Cache abstraction, and so was my answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: stackoverflow A question that's better suited to stackoverflow.com
Projects
None yet
Development

No branches or pull requests

4 participants