]> git.openstreetmap.org Git - rails.git/commitdiff
Remove the user type from cache keys
authorTom Hughes <tom@compton.nu>
Wed, 21 Jul 2010 23:27:35 +0000 (00:27 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 22 Jul 2010 19:47:34 +0000 (20:47 +0100)
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)