aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorFrancis Irving <francis@mysociety.org>2010-05-19 15:08:53 +0100
committerFrancis Irving <francis@mysociety.org>2010-05-19 15:08:53 +0100
commitecf920001a80d4eaa4fa34c7c465fe7e00964f32 (patch)
tree14e2b137684af6806b4128aa797149eba07742c8 /app/controllers/application_controller.rb
parent76abcd06b6531e15846d126431fc0edbc705f760 (diff)
Do the cacheing ourselves.
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index be555b291..3b60d69c1 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -260,11 +260,13 @@ class ApplicationController < ActionController::Base
path = url_for(param)
first_three_digits = param['id'].to_s()[0..2]
path = path.sub("/request/", "/request/" + first_three_digits + "/")
- path = path.sub(/^\//, "") # remove initial slash
+ path = "/views" + path
+ return File.join(self.cache_store.cache_path, path)
end
def foi_fragment_cache_all_for_request(info_request)
first_three_digits = info_request.id.to_s()[0..2]
- return "views/request/#{first_three_digits}/#{info_request.id}"
+ path = "views/request/#{first_three_digits}/#{info_request.id}"
+ return File.join(self.cache_store.cache_path, path)
end
# URL generating functions are needed by all controllers (for redirects),