Module: ActionController::Caching::ExtendedFragments
- Defined in:
- lib/extended_fragment_cache.rb
Class Method Summary collapse
-
.append_features(base) ⇒ Object
Add a local_fragment_cache object and accessor.
Class Method Details
.append_features(base) ⇒ Object
Add a local_fragment_cache object and accessor.
40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/extended_fragment_cache.rb', line 40 def self.append_features(base) #:nodoc: super base.class_eval do @@local_fragment_cache = {} cattr_accessor :local_fragment_cache end # add an after filter to flush the local cache after every request base.after_filter({}) do |c| @@local_fragment_cache.clear end end |