aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 89d49ba57..2f5b4d643 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -46,7 +46,13 @@ class RequestController < ApplicationController
end
def show
- long_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