Let’s say I have this in my controller:
caches_action :my_action, :cache_path => Proc.new { |c| "my_action##{c.params}" }
Where the url is something like:
/w/:some_id/:additional_params
The caching works just fine, however I can’t find how to expire it.
I’ve tried:
expire_action(:controller => '/my_controller', :action => 'my_action')
expire_fragment(/my_action/)
store = ActionController::Base.cache_store
store.delete_matched(/my_action/)
But none is expiring my action. Any idea if it’s possible to expire a matching action like this?
From the comments at Caching docs you could add
:expires_inoption:Also, as you indicated, your URL-s are in the form of
/w/:some_id/:additional_paramsso there is nomy_actionin the url. So you won’t match any objects with regexp/my_action/.Probably this would expire cache: