Module: ActionDispatch::Http::Cache::Response
- Included in:
- Response
- Defined in:
- lib/action_dispatch/http/cache.rb
Instance Attribute Summary collapse
-
#cache_control ⇒ Object
readonly
Returns the value of attribute cache_control.
-
#etag ⇒ Object
(also: #etag?)
Returns the value of attribute etag.
Instance Method Summary collapse
Instance Attribute Details
#cache_control ⇒ Object (readonly)
Returns the value of attribute cache_control.
46 47 48 |
# File 'lib/action_dispatch/http/cache.rb', line 46 def cache_control @cache_control end |
#etag ⇒ Object Also known as: etag?
Returns the value of attribute etag.
46 47 48 |
# File 'lib/action_dispatch/http/cache.rb', line 46 def etag @etag end |
Instance Method Details
#last_modified ⇒ Object
49 50 51 52 53 |
# File 'lib/action_dispatch/http/cache.rb', line 49 def last_modified if last = headers[LAST_MODIFIED] Time.httpdate(last) end end |
#last_modified=(utc_time) ⇒ Object
59 60 61 |
# File 'lib/action_dispatch/http/cache.rb', line 59 def last_modified=(utc_time) headers[LAST_MODIFIED] = utc_time.httpdate end |
#last_modified? ⇒ Boolean
55 56 57 |
# File 'lib/action_dispatch/http/cache.rb', line 55 def last_modified? headers.include?(LAST_MODIFIED) end |