diff options
-rw-r--r-- | app/controllers/application_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/help_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/public_body_controller.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 41108ad19..0f287f2e4 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -272,7 +272,7 @@ class ApplicationController < ActionController::Base end # Set cache headers for Squid reverse proxy in front of application - def cache_in_squid(max_age = 10) + def set_http_header_cache_expiry(max_age = 10) response.headers["Vary"] = 'Cookie, Accept-Encoding' expires_in max_age.minutes, :public => true end diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb index 01991917c..a97a337fa 100644 --- a/app/controllers/help_controller.rb +++ b/app/controllers/help_controller.rb @@ -9,7 +9,7 @@ class HelpController < ApplicationController def about - cache_in_squid + set_http_header_cache_expiry end def unhappy diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb index 4ca8d1404..98251a554 100644 --- a/app/controllers/public_body_controller.rb +++ b/app/controllers/public_body_controller.rb @@ -97,7 +97,7 @@ class PublicBodyController < ApplicationController end end - cache_in_squid + set_http_header_cache_expiry end # Used so URLs like /local/islington work, for use e.g. writing to a local paper. |