Commit 476508fc

mo khan <mo@mokhan.ca>
2013-12-31 20:53:05
cache the admin/users page because it is a slow page.
1 parent d331623
Changed files (1)
app
controllers
app/controllers/admin/users_controller.rb
@@ -4,6 +4,8 @@ module Admin
       @users = User.includes(:avatar).order(:created_at => :desc)
       @recent_users = @users.limit(10)
       @active_users = @users.order(:updated_at).limit(10)
+      expires_in(10.minutes)
+      fresh_when(User.maximum(:updated_at)) if User.any?
     end
   end
 end