Generate cache paths in the same way as the normal expire_action routine

so that the escaping matches correctly.
This commit is contained in:
Tom Hughes 2010-01-11 18:24:55 +00:00
parent 70bb55b35e
commit 7381dad23b

View file

@ -242,7 +242,7 @@ class ApplicationController < ActionController::Base
##
# extend expire_action to expire all variants
def expire_action(options = {})
path = fragment_cache_key(options).gsub('?', '.').gsub(':', '.')
path = ActionCachePath.path_for(self, options, false).gsub('?', '.').gsub(':', '.')
expire_fragment(Regexp.new(Regexp.escape(path) + "\\..*"))
end