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:
parent
cd3fc33171
commit
0e19a9290d
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
||||
##
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue