From: Tom Hughes Date: Wed, 21 Jul 2010 23:33:07 +0000 (+0100) Subject: Remove use of wildcard cache expiry X-Git-Tag: live~6331^2~4 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/0e19a9290d77430dc68479ea469f19fb83ab0fcc?hp=cd3fc33171daf8ae2d2a0cc3ff4261c021da3f85 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. --- diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 9af28de6f..c50c5f664 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -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 ##