Commit ee330f5f
Changed files (6)
app/controllers/admin/users_controller.rb
@@ -5,7 +5,6 @@ module Admin
@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
app/controllers/profiles_controller.rb
@@ -4,7 +4,6 @@ class ProfilesController < ApplicationController
def index
@profiles = User.includes(:avatar).where('creations_count > 0').order(:creations_count => :desc).page(params[:page]).per(12)
expires_in(1.hour)
- fresh_when(User.maximum(:updated_at)) if User.any?
end
def show
@@ -16,7 +15,6 @@ class ProfilesController < ApplicationController
@map_url += "&markers=#{user.latitude}%2C#{user.longitude}"
end
expires_in(1.hour)
- fresh_when(@user)
end
def favorites
app/controllers/sitemap_controller.rb
@@ -7,7 +7,6 @@ class SitemapController < ApplicationController
@base_url = "https://#{request.host_with_port}"
headers['Content-Type'] = 'application/xml'
expires_in(1.hour)
- fresh_when(@creations) if @creations.any?
respond_to do |format|
format.xml
end
app/controllers/tutorials_controller.rb
@@ -4,13 +4,11 @@ class TutorialsController < ApplicationController
def index
@tutorials = Tutorial.includes(:tags).page(params[:page]).per(15)
expires_in(10.minutes)
- fresh_when(Tutorial.maximum(:updated_at)) if Tutorial.any?
end
def show
@tutorial = Tutorial.find(params[:id])
expires_in(24.hours)
- fresh_when(@tutorial)
end
def new