-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
API for application data caching #8140
Comments
One question: |
Right now we only plan to use the existing cache implementation which uses caffeine. If we go and support alternative providers like Infinispan or Hazelcast, we need to be very careful as these involve remote calls and the API must not assume locality cc @Sanne |
In my opinion, Quarkus Caching Layer should only use one cache provider internally. There is no need to support different caching providers (the same as there is no need to support different jpa providers). Quarkus should stick with only one good caching provider and build on that. I think caching providers like infinispan are better suited for the Quarkus Caching Layer than to only use caffeine because I would like to see the following features for Quarkus Caching Layer:
|
Using caching providers in embeeded mode (e.g. infinispan-embeeded) can be run locally (and does not involve remote calls). |
Sure: Infinispan is built on Caffeine providing such additional capabilities. We'll likely base such capabilities on the Infinispan code base, either directly or reimplementing bits and pieces with the help of the Infinispan team as best suited. |
I know but there is likely little value in swapping implementation in that case compared to the extra complexity of explaining how to configure stuff depending on the provider (more complex doc for example) |
One thing I miss is an enabled flag on prpperties to enable or disable the extension. I have quite a long list of classes methods annotated and would like to easily enable/disable the extension, for instance, to compare performance. Unless I missed something in the docs, today this is not possible and would require the removal of all annotations from my code. |
You are absolutely right @seseso, there is currently no way to disable the cache extension using a property, but I could easily take care of that missing flag. It looks like a build time property (meaning the flag could not be changed at runtime) would be enough, what do you think about that? |
It would solve my use case for sure. And it would bring it closer to other
extensions that provide a similar flag!
…On Fri, 31 Jul 2020, 21:56 Gwenneg Lepage, ***@***.***> wrote:
You are absolutely right @seseso <https://github.com/seseso>, there is
currently no way to disable the cache extension using a property, but I
could easily take care of that missing flag. It looks like a build time
property (meaning the flag could not be changed at runtime) would be
enough, what do you think about that?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8140 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTEWJUWGY6ARDGJNME3LE3R6MVZFANCNFSM4LTKU5LA>
.
|
Should this be closed as done? https://quarkus.io/guides/cache |
@agentgonzo I don't think so, this issue is about adding a "programmatic API", i.e. to be able to inject a |
@mkouba is right, this is still an ongoing subject. |
In my opinion, a programmatic way to access and operate the Cache is mandatory. The current operation is a good starting point but as a project grows, quickly emerge many situations where the minimalistic current API is not enough. I look forward to your next steps in this direction with great interest! |
Thank you for your interest @vteferrer! There is actually an open PR (see #8631) with a proposal of programmatic caching API. It is purposely restricted to data access methods for now but there will certainly be more features in the future (like stats for example). Feel free to comment it if you have any idea or suggestion! |
I´ve reviewed the open PR and I only miss a method to retrieve the keys associated with a Cache. This would be useful to to know what content has a Cache and find a particular item |
Thanks for reviewing the PR @vteferrer! I pushed bdb47f4 to expose the cache keys in |
The idea behind this change would be this, wouldn´t it?
I think it´s great! Thanks! |
Yes, that's exactly the idea. |
any workaround available at the moment to retrieve the Caffeine cache stats, while we wait for the PR #8631 to be merged? |
We really need something like this, current cache is barelly useful at any complex scenarios. |
Offer a programmatic API for application data cache offering features above and beyond the annotation based ones.
Follow up of #3306
CC @karesti and @gwenneg
The text was updated successfully, but these errors were encountered: