Commit fd084d5c
Changed files (1)
app
controllers
app/controllers/tutorials_controller.rb
@@ -3,10 +3,14 @@ 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