aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorFrancis Irving <francis@mysociety.org>2010-05-18 10:54:50 +0100
committerFrancis Irving <francis@mysociety.org>2010-05-18 10:54:50 +0100
commitba0bf5c3feb038a3e93a46b3c6790d467d298357 (patch)
tree9dd8b3431576c2f7644470ef0144b6724307fd7b /app/controllers/application_controller.rb
parenta2b8a05d128efe5b4e86b7c9be79e3e313755372 (diff)
Generate path for fragment cache in central place
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 58266eb42..ac64bd1e6 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -253,6 +253,14 @@ class ApplicationController < ActionController::Base
expires_in max_age.minutes, :private => false
end
+ # Used to work out where to cache fragments
+ def foi_fragment_cache_path(param)
+ return url_for(param)
+ end
+ def foi_fragment_cache_all_for_request(info_request)
+ return "views/request/#{info_request.id}"
+ end
+
# URL generating functions are needed by all controllers (for redirects),
# views (for links) and mailers (for use in emails), so include them into
# all of all.