Skip to content

Fix last_modified documentation #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 13, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions Resources/doc/features/headers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ For instance:
match:
host: ^login.example.com$
headers:
cache_control: { public: false, max_age: 0, s_maxage: 0, last_modified: "-1 hour" }
cache_control: { public: false, max_age: 0, s_maxage: 0 }
last_modified: "-1 hour"
vary: [Accept-Encoding, Accept-Language]

# match all actions of a specific controller
Expand All @@ -33,21 +34,24 @@ For instance:
attributes: { _controller: ^AcmeBundle:Default:.* }
additional_cacheable_status: [400]
headers:
cache_control: { public: true, max_age: 15, s_maxage: 30, last_modified: "-1 hour" }
cache_control: { public: true, max_age: 15, s_maxage: 30 }
last_modified: "-1 hour"

-
match:
path: ^/$
headers:
cache_control: { public: true, max_age: 64000, s_maxage: 64000, last_modified: "-1 hour" }
cache_control: { public: true, max_age: 64000, s_maxage: 64000 }
last_modified: "-1 hour"
vary: [Accept-Encoding, Accept-Language]

# match everything to set defaults
-
match:
path: ^/
headers:
cache_control: { public: true, max_age: 15, s_maxage: 30, last_modified: "-1 hour" }
cache_control: { public: true, max_age: 15, s_maxage: 30 }
last_modified: "-1 hour"

See the :doc:`/reference/configuration/headers` configuration reference.

Expand Down
8 changes: 4 additions & 4 deletions Resources/doc/reference/configuration/headers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ checked in the order specified, where the first match wins.
public: false
max_age: 0
s_maxage: 0
last_modified: "-1 hour"
last_modified: "-1 hour"
vary: [Accept-Encoding, Accept-Language]

# match all actions of a specific controller
Expand All @@ -34,7 +34,7 @@ checked in the order specified, where the first match wins.
public: true
max_age: 15
s_maxage: 30
last_modified: "-1 hour"
last_modified: "-1 hour"

-
match:
Expand All @@ -44,7 +44,7 @@ checked in the order specified, where the first match wins.
public: true
max_age: 64000
s_maxage: 64000
last_modified: "-1 hour"
last_modified: "-1 hour"
vary: [Accept-Encoding, Accept-Language]

# match everything to set defaults
Expand All @@ -56,7 +56,7 @@ checked in the order specified, where the first match wins.
public: true
max_age: 15
s_maxage: 30
last_modified: "-1 hour"
last_modified: "-1 hour"

rules
-----
Expand Down