method
expires_in
v2.0.3 -
Show latest stable
-
1 note -
Class: ActionController::Base
- 1.0.0 (0)
- 1.1.6 (0)
- 1.2.6 (0)
- 2.0.3 (0)
- 2.1.0 (0)
- 2.2.1 (0)
- 2.3.8 (-2)
- 3.0.0
- 3.0.9
- 3.1.0
- 3.2.1
- 3.2.8
- 3.2.13
- 4.0.2
- 4.1.8
- 4.2.1
- 4.2.7
- 4.2.9
- 5.0.0.1
- 5.1.7
- 5.2.3
- 6.0.0
- 6.1.3.1
- 6.1.7.7
- 7.0.0
- 7.1.3.2
- 7.1.3.4
- What's this?
expires_in(seconds, options = {})
protected
Sets a HTTP 1.1 Cache-Control header. Defaults to issuing a "private" instruction, so that intermediate caches shouldn’t cache the response.
Examples:
expires_in 20.minutes expires_in 3.hours, :private => false expires in 3.hours, 'max-stale' => 5.hours, :private => nil, :public => true
This method will overwrite an existing Cache-Control header. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html for more possibilities.
Register or
log in
to add new notes.
kuboon -
December 12, 2014
0 thanks
'max-stale' should be sent by client, not by server
3rd example is a trap.