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

Add getKeys function to org.springframework.cache.Cache [SPR-8878] #13519

Closed
spring-projects-issues opened this issue Nov 26, 2011 · 1 comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link
Collaborator

y b opened SPR-8878 and commented

It would be nice to get access to all the keys of a specific cache from org.springframework.cache.Cache, in the same way possible for the Ehcache net.sf.ehcache.Cache version.


Affects: 3.1 RC2

@spring-projects-issues
Copy link
Collaborator Author

Costin Leau commented

It's unlikely we'll ever introduce such a method because, while on a local cache everything is in memory and this call would not create issues, in a distributed environment it would be unreliable.
Consider a cache with 100k items - if you ask for the keys, most likely you'll end up with an OOM.

Use the native cache API - that gives you the feature you want right now, with minimal effort.

@spring-projects-issues spring-projects-issues added status: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement in: core Issues in core modules (aop, beans, core, context, expression) labels Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant