diff options
| author | mo khan <mo@mokhan.ca> | 2013-12-30 08:13:05 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2013-12-30 08:13:05 -0700 |
| commit | 55fd31cf068c6ef459db16f302b8cebfb689d41d (patch) | |
| tree | 88adeae75f43b7cf0857e638063835b6e3b69569 /app/controllers/tutorials_controller.rb | |
| parent | 66b3458dafa78d10bc581fd2938e180d8d028f2f (diff) | |
| parent | 74148850f0c57432b1bc9c326c975c37cd335d49 (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 |
