Skip to content

Spring cache with async caffeine #518

Answered by ben-manes
namila007 asked this question in Q&A
Discussion options

You must be logged in to vote

My limited understanding is that Spring Cache does not support asynchronous caching, e.g. by using Reactor. The interfaces assume blocking calls where the values are opaque objects. You would have to ask the Spring folks for more advice, but I believe they have previously expressed no interest in asynchronous support. Unfortunately my experience with that framework is over a decade old, so I can't offer much help.

In the past, the Spring Cache authors have said their abstraction is only intended for simple, common cases. Any advanced cases should be handled by using the native apis. You should be able to use AsyncLoadingCache directly and convert between futures and monos, for use by spri…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@namila007
Comment options

@ben-manes
Comment options

@namila007
Comment options

Answer selected by ben-manes
Comment options

You must be logged in to vote
1 reply
@ben-manes
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants