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

delete_matched for ActiveSupport::Cache::DalliStore #397

Closed
equivalent opened this issue Oct 14, 2013 · 2 comments
Closed

delete_matched for ActiveSupport::Cache::DalliStore #397

equivalent opened this issue Oct 14, 2013 · 2 comments

Comments

@equivalent
Copy link

Hi,

I just want to ask what would you recommend to fake functionality of delete_matched for ActiveSupport::Cache::DalliStore the only solution that I found is :

...would you go with this ?

Also, I kinda get that Dalli doesn't have any build in functionality to match keys so that application need to do it manually, however it seems to me strange why. Could you explain it to me why ?

@kikan
Copy link

kikan commented Aug 4, 2014

Hi,

There's a fork of dalli-delete-matched that's compatible with latest dalli gem (2.7.2 as writing).

https://github.com/codez/dalli-delete-matched

But... it seems each time you store a key, the dalli-delete-matched gem reads and rewrites an array of all keys, which can slow down a lot and limit the benefits of cache.

Memcached doesn't allow listing keys, so this feature has to be managed by your self. Maybe that's why it's not implemented in DalliStore.

@petergoldstein
Copy link
Owner

Per @kikan that's exactly why it isn't supported in ActiveSupport::Cache::DalliStore. Not planning to add this feature. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants