diff options
| author | mo khan <mo@mokhan.ca> | 2013-12-30 08:00:28 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2013-12-30 08:00:28 -0700 |
| commit | 5eebdb6942e7a5ae291ab41b8e3906add0953b42 (patch) | |
| tree | 40ff5a69f388cb2c38436254045083fe9298963b /app/controllers/tutorials_controller.rb | |
| parent | c56a474faf41b403d38c92519a204019c979c80e (diff) | |
| parent | d0b0d98479e3f1bba2dbfebdab767ce99609923c (diff) | |
merge with master.
Diffstat (limited to 'app/controllers/tutorials_controller.rb')
| -rw-r--r-- | app/controllers/tutorials_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/tutorials_controller.rb b/app/controllers/tutorials_controller.rb index 6080f275..b9b70653 100644 --- a/app/controllers/tutorials_controller.rb +++ b/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 |
