Skip to content

Does Caffeine support cache regions or a cache manager? #1202

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

You must be logged in to vote

The core library is just a data structure with no extra lifecycle, like a HashMap. It doesn't include any concepts of a manager or region owner, it's just a map that includes eviction policies.

The JCache module implements jsr107 which defines a CacheManager and lifecycle. This is a standard that was rejected by JEE / Jakarta, most modern frameworks, and has low adoption. The API is error prone so it is mostly used in cases like Hibernate which was an early adopter.

Otherwise frameworks like Quarkus, Spring, and others incorporate their own cache managers. Their integrations are simple because they don't have to bridge different lifecycles and can manage everything directly. These tend to…

Replies: 5 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by ben-manes
Comment options

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

Comment options

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

Comment options

You must be logged in to vote
2 replies
@Stephan202
Comment options

@ben-manes
Comment options

Comment options

You must be logged in to vote
2 replies
@ben-manes
Comment options

@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