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?
install gem dalli-store-extensions https://github.com/defconomicron/dalli-store-extensions
In the Sweeper
expire_fragment /#{Regexp.escape(restaurant.id)}\/stocks*/