aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/request_controller.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2011-07-25 15:24:58 +0100
committerSeb Bacon <seb.bacon@gmail.com>2011-07-25 15:24:58 +0100
commit04927e448f99f67bbfde88dd466f03fb23373b28 (patch)
treefabc9d81ab8d27452bd49c6f988afbd7a3d3644a /app/controllers/request_controller.rb
parent1e33a67f9e3e282ce83c18127624f74bb5840549 (diff)
Add cache headers to various pages (in three categories: short, medium, and long).
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r--app/controllers/request_controller.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 80246c811..472f18f6e 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -23,6 +23,7 @@ class RequestController < ApplicationController
end
def show
+ medium_cache
@locale = self.locale_from_params()
PublicBody.with_locale(@locale) do
@@ -95,6 +96,7 @@ class RequestController < ApplicationController
# Extra info about a request, such as event history
def details
+ long_cache
@info_request = InfoRequest.find_by_url_title(params[:url_title])
if !@info_request.user_can_view?(authenticated_user)
render :template => 'request/hidden', :status => 410 # gone
@@ -106,6 +108,7 @@ class RequestController < ApplicationController
# Requests similar to this one
def similar
+ short_cache
@per_page = 25
@page = (params[:page] || "1").to_i
@info_request = InfoRequest.find_by_url_title(params[:url_title])
@@ -124,6 +127,7 @@ class RequestController < ApplicationController
end
def list
+ medium_cache
@view = params[:view]
if @view.nil?