From: Tom Hughes Date: Wed, 21 Jul 2010 23:27:35 +0000 (+0100) Subject: Remove the user type from cache keys X-Git-Tag: live~6274^2~5 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/cd3fc33171daf8ae2d2a0cc3ff4261c021da3f85 Remove the user type from cache keys --- 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)