From cd3fc33171daf8ae2d2a0cc3ff4261c021da3f85 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 22 Jul 2010 00:27:35 +0100 Subject: [PATCH] Remove the user type from cache keys --- app/controllers/application_controller.rb | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index c7c6c4add..9af28de6f 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -250,17 +250,7 @@ class ApplicationController < ActionController::Base cache_path = options[:cache_path] || Hash.new options[:cache_path] = Proc.new do |controller| - user = controller.instance_variable_get("@user") - - case - when user.nil? then user = :none - when user.display_name == controller.params[:display_name] then user = :self - when user.administrator? then user = :administrator - when user.moderator? then user = :moderator - else user = :other - end - - cache_path.merge(controller.params).merge(:locale => I18n.locale, :user => user) + cache_path.merge(controller.params).merge(:locale => I18n.locale) end actions.push(options) -- 2.43.2