Marco Jansen
3 post(s)
|
Hi,
I found out that one of my initializers (in config/initializers) stopped working after installing the Manage plugin. I have included the code of my initializer.
Has anybody else had problems with initializers that stopped working?
Thanks,
Marco
============
module ActionController::Caching::Pages::ClassMethods
def expire_page(path) return unless perform_caching
benchmark “Expired page: #{page_cache_file(path)}” do cache_directory = page_cache_path(path).sub(”.html”,”“) if File.exist?(cache_directory) FileUtils::rm_rf(cache_directory) else File.delete(page_cache_path(path)) if File.exist?(page_cache_path(path)) end end end
end
|
Marco Jansen
3 post(s)
|
Ah, just found this code in lib/fiveruns/manage/targets/rails/action_controller/base.rb
module Fiveruns::Manage::Targets::Rails::ActionController
module Base
def self.included(base) Fiveruns::Manage.instrument base, ClassMethods, InstanceMethods end
module ClassMethods
# Page Caching def cache_page_with_fiveruns_manage(args, &block) Fiveruns::Manage.tally :pages_caches do cache_page_without_fiveruns_manage(args, &block) end end def expire_page_with_fiveruns_manage(args, &block) Fiveruns::Manage.tally :pages_expires do expire_page_without_fiveruns_manage(args, &block) end end
end
Hmm.. so I was not the only one who was adjusting the cache expire code.
That explains it.
Marco
|