]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/application_controller.rb
Remove the user type from cache keys
[rails.git] / app / controllers / application_controller.rb
index c7c6c4add92af7ea747edd9a033c689d3c56d129..9af28de6f627de91c1a72151f6fb51dae21479c5 100644 (file)
@@ -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)