Replace infinispan with the lightweight caffeine#102
Merged
sswguo merged 2 commits intoCommonjava:ubi9from Dec 9, 2024
Merged
Conversation
ligangty
reviewed
Dec 9, 2024
| cacheManager.defineConfiguration( named, new ConfigurationBuilder().build() ); | ||
| return cacheManager.getCache(named, Boolean.TRUE); | ||
| Cache<String, String> cache = Caffeine.newBuilder() | ||
| .expireAfterAccess(15, TimeUnit.MINUTES) |
Member
There was a problem hiding this comment.
Should we set a maximumsize for the cache to vaoid potential OOM issue?
Member
Author
There was a problem hiding this comment.
Yeah, good point, just in case.
Member
|
BTW, seems caffeine has quarkus extentions here: https://quarkus.io/extensions/io.quarkus/quarkus-caffeine/?tab=docs |
Member
Author
Cool, seems it's quite clean as the follows. I will check again and ref it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We plan to integrate this as a sidecar to the mw pipeline, and have to slim the image to avoid the performance issue when download the image each time for mw pipeline running. We can do this from app level and image level, this PR is for app level, I found two big deps, one is quarkus-opentelemetry and another one is infinispan.