diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-07-25 15:24:58 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-07-25 15:24:58 +0100 |
commit | 04927e448f99f67bbfde88dd466f03fb23373b28 (patch) | |
tree | fabc9d81ab8d27452bd49c6f988afbd7a3d3644a /app/controllers/public_body_controller.rb | |
parent | 1e33a67f9e3e282ce83c18127624f74bb5840549 (diff) |
Add cache headers to various pages (in three categories: short, medium, and long).
Diffstat (limited to 'app/controllers/public_body_controller.rb')
-rw-r--r-- | app/controllers/public_body_controller.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb index c74959b17..05acf4868 100644 --- a/app/controllers/public_body_controller.rb +++ b/app/controllers/public_body_controller.rb @@ -11,6 +11,7 @@ require 'csv' class PublicBodyController < ApplicationController # XXX tidy this up with better error messages, and a more standard infrastructure for the redirect to canonical URL def show + long_cache if MySociety::Format.simplify_url_part(params[:url_name], 'body') != params[:url_name] redirect_to :url_name => MySociety::Format.simplify_url_part(params[:url_name], 'body'), :status => :moved_permanently return @@ -80,6 +81,7 @@ class PublicBodyController < ApplicationController end def list + long_cache # XXX move some of these tag SQL queries into has_tag_string.rb @tag = params[:tag] @locale = self.locale_from_params() |