From ba0bf5c3feb038a3e93a46b3c6790d467d298357 Mon Sep 17 00:00:00 2001 From: Francis Irving Date: Tue, 18 May 2010 10:54:50 +0100 Subject: Generate path for fragment cache in central place --- app/controllers/application_controller.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/controllers/application_controller.rb') 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. -- cgit v1.2.3