-
Notifications
You must be signed in to change notification settings - Fork 37.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
Provide high-level cache API in Spring container [SPR-7308] #11967
Comments
Juergen Hoeller commented Yes, this is in consideration for Spring 3.1, actually. Thanks for reminding us that we haven't had a proper JIRA issue for it yet :-) Juergen |
Liu, Yinwei David commented Thanks Juergen! David |
Abhishek Gupta commented Hi Juergen, Thanks, |
Liu, Yinwei David commented Hi Juergen,
|
Eric Dalquist commented Hello, I'm one of the authors of http://code.google.com/p/ehcache-spring-annotations/ and am wondering if you would be interested in some contributions from our project for the official spring caching abstraction? We've had a lot of user feedback for our library over the last year and it could be good to get those ideas included. Looking through the source currently in SVN a few issues that I think would be good to address:
Nick (the other author) and I would be more than happy to sign over copyright for any code from our library you'd be interested in and we would also be happy in submitting patches or other contributions to this effort. Thank you for your consideration |
Costin Leau commented Hi Eric, Thanks for the offer. Patches are definitely welcome - not sure how papers need to be signed but I can look it up. For M1 we're trying to come out with a minimal set of features to gather feedback. We had some functionality pulled back simply because we were getting ahead of ourselves. It remains to be seen whether the KeyGenerator is still useful considering SpEL can do all that plus much more.Regarding the issues you mentioned, some quick answers:
|
Eric Dalquist commented Thanks for the quick response, from it I'm thinking the biggest thing we could find a way to contribute is the key generation implementations. We recently added a SpEL generator and register our other generators as static functions that can be called from within the SpEL. This allows for an expression like: "digest(args[0], args[1].id)" to generate a MessageDigest based key for the two objects resolved by the expression. You can take a look at our existing key generators here: I'm thinking that with the reliance on SpEL finding a way to provide these as easy to call functions in the expressions the user provides. The big concerns with key generation are around arrays, Class and Enum objects. Their hashCodes are different on every JVM instance which makes things like clustering or persistent storage in the underlying cache impl non-functional because keys aren't stable. All of our key generators support reflection but it is disabled by default specifically due to performance issues. Initially we didn't want to include it either but had enough demand from users dealing with objects out of their control. This may not be as necessary now that SpEL is the primary approach for key generation. |
Costin Leau commented Guys,I'll close this issue since we introduced the caching abstraction in Spring 3.1 M1: Cheers, |
Liu, Yinwei David commented Cool, thanks Costin! David |
Liu, Yinwei David opened SPR-7308 and commented
Hi,
Do you have any plan to provide a high level cache API in Spring container? such as TransacationManager which manages different transaction resource.
Currently, we have a lot different cache implementations, e.g. EHCache, H2, and so on. Each cache needs a different api to get data from the underlying cache. It is a kind of barrier to disallow people easily switch from one cache to another cache, we always need a extra layer to decouple the our code with the actual cache.
I think it would be great if Spring can provide a high level cache api which can allow people easily choose a underlying cache.
Please let me know your thoughts, thanks.
David
Affects: 3.0.3
Issue Links:
6 votes, 11 watchers
The text was updated successfully, but these errors were encountered: