diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2012-06-20 09:47:27 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-06-20 09:47:27 +0100 |
commit | 6911d79f14386c0d30c5e4512746def39a6712be (patch) | |
tree | 0b254522869356ebd051efb29ce980ed1e2bd91b /app/controllers/request_controller.rb | |
parent | 58de2af30d7fef731419ab643400f838ede27495 (diff) | |
parent | c100cb5aff5a958709aae77d03e6a4aea666a910 (diff) |
Merge branch 'release/0.6' into wdtk
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r-- | app/controllers/request_controller.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index aa770e151..2f5b4d643 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -46,7 +46,13 @@ class RequestController < ApplicationController end def show - medium_cache + if !MySociety::Config.get('VARNISH_HOST').nil? + # If varnish is set up to accept PURGEs, then cache for a + # long time + long_cache + else + medium_cache + end @locale = self.locale_from_params() PublicBody.with_locale(@locale) do |