Module: ActionController::Caching::HttpCache::ClassMethods
- Defined in:
- lib/easy_http_cache.rb
Instance Method Summary collapse
-
#http_cache(*actions) ⇒ Object
Declares that
actions
should be cached.
Instance Method Details
#http_cache(*actions) ⇒ Object
Declares that actions
should be cached.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/easy_http_cache.rb', line 11 def http_cache(*actions) return unless perform_caching = actions. .assert_valid_keys( :last_modified, :method, :etag, :if, :unless ) http_cache_filter = HttpCacheFilter.new( :method => .delete(:method), :last_modified => [.delete(:last_modified)].flatten.compact, :etag => .delete(:etag) ) = {:only => actions}.merge() before_filter(http_cache_filter, ) end |