Skip to content
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

Insert all elements of a returned list into a Cache [SPR-15213] #19777

spring-projects-issues opened this issue Jan 31, 2017 · 1 comment
in: core status: declined type: enhancement


Copy link

@spring-projects-issues spring-projects-issues commented Jan 31, 2017

Wouter Lievens opened SPR-15213 and commented

When a query method returns a list, I would like to be able to insert each element of that list separately into a Cache, each with its own associated key.

Reference URL:

Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Feb 1, 2017

Stéphane Nicoll commented

Thanks for creating the issue but I am not keen to add this extra complexity to the cache abstraction. It is not meant to manage state for you (the next logical step if we allow this is that we have to keep the returned list in sync with each item). And if we don't we are inconsistent and we merely provide a way to talk to the cache using annotations. That's not very helpful.

Back to your example, this is typically what a second level cache is meant to do for you. This is not in the scope of the cache abstraction.

@spring-projects-issues spring-projects-issues added status: declined type: enhancement in: core labels Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: core status: declined type: enhancement
None yet

No branches or pull requests

2 participants