From ed5770692dbc12b703c7b92c51eebca596900236 Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Thu, 16 Aug 2012 10:19:42 +0100 Subject: Method spacing. --- app/controllers/application_controller.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/controllers/application_controller.rb') diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 41adf1848..eb6c9c7f7 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -205,13 +205,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}" -- cgit v1.2.3