aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/request_controller.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-06-20 09:47:27 +0100
committerSeb Bacon <seb.bacon@gmail.com>2012-06-20 09:47:27 +0100
commit6911d79f14386c0d30c5e4512746def39a6712be (patch)
tree0b254522869356ebd051efb29ce980ed1e2bd91b /app/controllers/request_controller.rb
parent58de2af30d7fef731419ab643400f838ede27495 (diff)
parentc100cb5aff5a958709aae77d03e6a4aea666a910 (diff)
Merge branch 'release/0.6' into wdtk
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r--app/controllers/request_controller.rb8
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