Commit 0969fb8a
Changed files (1)
app
controllers
app/controllers/creations_controller.rb
@@ -3,11 +3,15 @@ class CreationsController < ApplicationController
def index
@creations = FindAllCreationsQuery.new.fetch(params)
+ expires_in(10.minutes)
+ fresh_when(Creation.maximum(:updated_at)) if Creation.any?
end
def show
@creation = Creation.find(params[:id])
@primary_photo = @creation.primary_image
+ expires_in(1.minute)
+ fresh_when(@creation)
end
def new