Remove use of wildcard cache expiry

Instead of doing wildcard cache expiry, just iterate over the
available locales, expiring the requested entry in each locale.
This commit is contained in:
Tom Hughes 2010-07-22 00:33:07 +01:00
parent cd3fc33171
commit 0e19a9290d

View file

@ -261,8 +261,9 @@ class ApplicationController < ActionController::Base
##
# extend expire_action to expire all variants
def expire_action(options = {})
path = ActionCachePath.path_for(self, options, false).gsub('?', '.').gsub(':', '.')
expire_fragment(Regexp.new(Regexp.escape(path) + "\\..*"))
I18n.available_locales.each do |locale|
super options.merge(:locale => locale)
end
end
##