How to delete a keys in memcached with regex (using Dalli+Rails)
def expire_all
expire_fragment(Regexp.new("/customers/customers"))
expire_fragment(Regexp.new("/customers/customers\/"))
expire_fragment(Regexp.new("/agreements/agreements"))
expire_fragment(Regexp.new("/agreements/agreements\/"))
end
Not working with memcached. Any Ideas?
Memcached isn't able to iterate over its keys, so regexp expiration won't work. See the docs.
Take a look at this for a potential workaround, though it's labor intensive.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With