Class: ActionController::Caching::HttpCache::HttpCacheFilter
- Inherits:
-
Object
- Object
- ActionController::Caching::HttpCache::HttpCacheFilter
- Defined in:
- lib/easy_http_cache.rb
Overview
:nodoc:
Instance Method Summary collapse
- #filter(controller) ⇒ Object
-
#initialize(options = {}) ⇒ HttpCacheFilter
constructor
A new instance of HttpCacheFilter.
Constructor Details
#initialize(options = {}) ⇒ HttpCacheFilter
Returns a new instance of HttpCacheFilter.
31 32 33 |
# File 'lib/easy_http_cache.rb', line 31 def initialize( = {}) @options = end |
Instance Method Details
#filter(controller) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/easy_http_cache.rb', line 35 def filter(controller) return unless flash.empty? && controller.request.get? last_modified = get_last_modified(controller) controller.response.last_modified = last_modified if last_modified = (controller) controller.response.etag = if if controller.request.fresh?(controller.response) controller.send(:head, :not_modified) return false end end |