0
@@ -2,7 +2,7 @@ class Site < ActiveRecord::Base
0
@@theme_path = Pathname.new(RAILS_ROOT) + 'themes'
0
cattr_reader :theme_path
0
- cattr_accessor :multi_sites_enabled
0
+ cattr_accessor :multi_sites_enabled
, :cache_sweeper_tracing0
@@ -195,7 +195,26 @@ class Site < ActiveRecord::Base
0
original_timezone_writer(name)
0
+ def page_cache_directory
0
+ (RAILS_PATH + (RAILS_ENV == 'test' ? 'tmp' : 'public') + 'cache' + host) :
0
+ (RAILS_PATH + (RAILS_ENV == 'test' ? 'tmp/cache' : 'public'))
0
+ def expire_cached_pages(controller, log_message, pages = nil)
0
+ pages ||= cached_pages.find_current(:all)
0
+ returning cached_log_message_for(log_message, pages) do |msg|
0
+ controller.logger.warn msg if cache_sweeper_tracing
0
+ pages.each { |p| controller.class.expire_page(p.url) }
0
+ CachedPage.expire_pages(self, pages)
0
+ def cached_log_message_for(log_message, pages)
0
+ pages.inject([log_message, "Expiring #{pages.size} page(s)"]) { |msg, p| msg << " - #{p.url}" }.join("\n")
0
def permalink_variable_format?(var)
0
Mephisto::Dispatcher.variable_format?(var)
Comments
No one has commented yet.