From 0e19a9290d77430dc68479ea469f19fb83ab0fcc Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 22 Jul 2010 00:33:07 +0100 Subject: [PATCH 1/1] 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. --- app/controllers/application_controller.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 ## -- 2.43.2