I am having a problem with expiring the action cache in my application.
Here is my controller:
class ToplistsController < ApplicationController caches_action :songs, cache_path: :custom_cache_path.to_proc def custom_cache_path "
I somehow need to be able to reset the cache path, but I canβt figure out how to do this.
I have already tried using this technique without success. It looks like Dalli, which is my caching mechanism, does not support regex.
I get this error when trying to use this code:
expire_fragment(/songs/)
ActiveSupport::Cache::DalliStore does not support delete_matched
I tried to use this line of code for debugging but it was ignored.
before_filter only: [:songs] expire_fragment(custom_cache_path) end
I am using Rails 3.1.0.rc6, Dalli 1.0.5 and Ruby 1.9.2.
Oleander
source share