-
Notifications
You must be signed in to change notification settings - Fork 120
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
Is there a getAll method? #379
Comments
Hey @soloman817, there is not a |
Thanks for the reply, I'm currently use Caffeine as a in-memory cache, and I like the API design a lot, but I do need a get all method. Would it be reasonable, that some abstract method can only be implemented with specific backend? Say it works for Caffeine, but for Redis, just throw exception? |
Or, another solution would be, I use a separate cache to store the ids, then if I can query the cache on a set of id, that would be better, even possible for Redis |
Exposing a method that allows you to pass a set of keys sounds like a pretty good option to me. We can definitely look into adding a method like that. However, I think it probably makes sense for us to wait until #345 is finished before adding this functionality. As a workaround in the meantime, you can always create your own Caffeine cache and pass it in to Scalacache (example in docs). Then you can query any methods direct on the cache that you need to. |
Thanks! |
@lewisjkl A |
Hey @jbenoit2011, thanks for resurfacing this. We are waiting on the next major release of We are currently trying to keep the core of Scalacache as minimal as possible, which is why we removed some of the other cache backends (as you mentioned). We are working on moving scalacache to its own github group where we hope to be able to have other projects containing various cache backends. Once we have that up, then something like scalacache-dynamodb would be great! |
@jbenoit2011 did you ever published this? I would be interested... |
From the source code, I see there is a
removeAll
method, but I cannot find agetAll
method, does that exist?The text was updated successfully, but these errors were encountered: