lib/nitro/caching/output.rb in nitro-0.25.0 vs lib/nitro/caching/output.rb in nitro-0.26.0
- old
+ new
@@ -8,11 +8,11 @@
# Output caching.
module Output
- def self.append_features(base) # :nodoc:
+ def self.included(base) # :nodoc:
super
base.extend(ClassMethods)
base.module_eval do
cattr_accessor :output_cache_root, 'public'
end
@@ -55,9 +55,14 @@
def do_cache_output
if caching_enabled? and caching_allowed?
self.class.do_cache_output(@request.uri, @out)
end
end
+
+ #--
+ # If you change this method, don't forget the CacheSweeper
+ # expire method.
+ #++
def expire_output(name)
begin
Logger.debug "Expirinig cache file '#{context.dispatcher.public_root}/#{name}'" if $DBG
FileUtils.rm_rf("#{context.dispatcher.public_root}/#{name}")