aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2012-08-16 13:23:01 +0100
committerLouise Crow <louise.crow@gmail.com>2012-08-16 13:23:01 +0100
commitb59164bf2658058cf8e7360c6d1bd53c557b8972 (patch)
tree6471acd21ddc8dced544a28156e79b7b0dde6798 /app/controllers/application_controller.rb
parent1cb96ca9deb4157341d9ab0bce16513593f573d8 (diff)
parent9fb7527720321e43f4ea2464a1dfca1b2e0eb46b (diff)
Merge branch 'wdtk' into develop
Conflicts: app/controllers/admin_request_controller.rb config/httpd.conf spec/models/info_request_spec.rb
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index a124743b2..7b5eb5590 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -213,13 +213,16 @@ class ApplicationController < ActionController::Base
foi_cache_path = File.expand_path(File.join(File.dirname(__FILE__), '../../cache'))
return File.join(foi_cache_path, path)
end
+
def foi_fragment_cache_exists?(key_path)
return File.exists?(key_path)
end
+
def foi_fragment_cache_read(key_path)
logger.info "Reading from fragment cache #{key_path}"
return File.read(key_path)
end
+
def foi_fragment_cache_write(key_path, content)
FileUtils.mkdir_p(File.dirname(key_path))
logger.info "Writing to fragment cache #{key_path}"