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-issuemaster opened this Issue Nov 26, 2011 · 1 comment

Comments

Projects
None yet
1 participant
@spring-issuemaster
Copy link
Collaborator

spring-issuemaster commented Nov 26, 2011

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-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

spring-issuemaster commented Nov 27, 2011

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment