-
Notifications
You must be signed in to change notification settings - Fork 5
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
Replace infinispan with the lightweight caffeine #102
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
cacheManager.defineConfiguration( named, new ConfigurationBuilder().build() ); | ||
return cacheManager.getCache(named, Boolean.TRUE); | ||
Cache<String, String> cache = Caffeine.newBuilder() | ||
.expireAfterAccess(15, TimeUnit.MINUTES) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we set a maximumsize for the cache to vaoid potential OOM issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, good point, just in case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
BTW, seems caffeine has quarkus extentions here: https://quarkus.io/extensions/io.quarkus/quarkus-caffeine/?tab=docs |
Cool, seems it's quite clean as the follows. I will check again and ref it.
|
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.