diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-11-21 14:53:11 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-11-25 16:07:25 +0000 |
commit | b54aef5dda20fc9ff15a0ef3dd72327e52c8604c (patch) | |
tree | eabb50080b821fa97ae67efbb89a5e1b9f6270e9 /app/controllers/request_controller.rb | |
parent | ffa22a2d2586c09ac502a4993abf8d74fcb5aa0a (diff) |
Cache the similar requests for 1 day
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r-- | app/controllers/request_controller.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index 341ecdcd5..841950cd5 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -92,6 +92,8 @@ class RequestController < ApplicationController # Sidebar stuff @sidebar = true + @similar_cache_key = cache_key_for_similar_requests(@info_request, @locale) + # Track corresponding to this page @track_thing = TrackThing.create_track_for_request(@info_request) @feed_autodetect = [ { :url => do_track_url(@track_thing, 'feed'), :title => @track_thing.params[:title_in_rss], :has_json => true } ] @@ -962,5 +964,10 @@ class RequestController < ApplicationController file_info end + def cache_key_for_similar_requests(info_request, locale) + "request/similar/#{info_request.id}/#{locale}" + end + + end |