From 301e44b85cd323c9791a95b9874bd7bb76be552a Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 11 Jun 2014 11:52:46 +0200 Subject: [PATCH 1/4] don't render the list inside a blockquote --- contributing/documentation/license.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/contributing/documentation/license.rst b/contributing/documentation/license.rst index ccbda535dec..c8bce4bdaea 100644 --- a/contributing/documentation/license.rst +++ b/contributing/documentation/license.rst @@ -32,13 +32,13 @@ Attribution-Share Alike 3.0 Unported `License`_. * *Other Rights* — In no way are any of the following rights affected by the license: - * Your fair dealing or fair use rights, or other applicable copyright - exceptions and limitations; + * Your fair dealing or fair use rights, or other applicable copyright exceptions + and limitations; - * The author's moral rights; + * The author's moral rights; - * Rights other persons may have either in the work itself or in how - the work is used, such as publicity or privacy rights. + * Rights other persons may have either in the work itself or in how the + work is used, such as publicity or privacy rights. * *Notice* — For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link From dfcfb3a017e1d050993347b210d7bee35b9beb5f Mon Sep 17 00:00:00 2001 From: Gonzalo Vilaseca Date: Wed, 11 Jun 2014 15:45:24 +0100 Subject: [PATCH 2/4] Varnish only takes into account max-age Varnish only takes into account max-age, Symfony by default returns Cache-Control: no-cache so Varnish caches it anyway. You need to specify: ``` if (beresp.http.Pragma ~ "no-cache" || beresp.http.Cache-Control ~ "no-cache" || beresp.http.Cache-Control ~ "private") { return (hit_for_pass); } ``` In order to avoid Varnish from caching content. --- cookbook/cache/varnish.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cookbook/cache/varnish.rst b/cookbook/cache/varnish.rst index 48eb43c2592..477809ca74b 100644 --- a/cookbook/cache/varnish.rst +++ b/cookbook/cache/varnish.rst @@ -57,6 +57,12 @@ Symfony2 adds automatically: // For Varnish < 3.0 // esi; } + /* Do not cache if no-cache is found in headers */ + if (beresp.http.Pragma ~ "no-cache" || + beresp.http.Cache-Control ~ "no-cache" || + beresp.http.Cache-Control ~ "private") { + return (hit_for_pass); + } } .. caution:: From 3998e2f5eb6cfee54a26a7ad6e0de52ed020d6fb Mon Sep 17 00:00:00 2001 From: Gonzalo Vilaseca Date: Wed, 11 Jun 2014 17:12:59 +0100 Subject: [PATCH 3/4] Update varnish.rst --- cookbook/cache/varnish.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cookbook/cache/varnish.rst b/cookbook/cache/varnish.rst index 477809ca74b..6794793e83d 100644 --- a/cookbook/cache/varnish.rst +++ b/cookbook/cache/varnish.rst @@ -57,7 +57,8 @@ Symfony2 adds automatically: // For Varnish < 3.0 // esi; } - /* Do not cache if no-cache is found in headers */ + /* By default Varnish ignores Cache-Control: nocache (https://www.varnish-cache.org/docs/3.0/tutorial/increasing_your_hitrate.html#cache-control), + so in order avoid caching it has to be done explicitly */ if (beresp.http.Pragma ~ "no-cache" || beresp.http.Cache-Control ~ "no-cache" || beresp.http.Cache-Control ~ "private") { From 3a94e1f0747b7a85b8e1c12f6296fd58210e393b Mon Sep 17 00:00:00 2001 From: Gonzalo Vilaseca Date: Wed, 11 Jun 2014 18:43:31 +0100 Subject: [PATCH 4/4] Update varnish.rst --- cookbook/cache/varnish.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cookbook/cache/varnish.rst b/cookbook/cache/varnish.rst index 6794793e83d..da06add99f1 100644 --- a/cookbook/cache/varnish.rst +++ b/cookbook/cache/varnish.rst @@ -57,7 +57,8 @@ Symfony2 adds automatically: // For Varnish < 3.0 // esi; } - /* By default Varnish ignores Cache-Control: nocache (https://www.varnish-cache.org/docs/3.0/tutorial/increasing_your_hitrate.html#cache-control), + /* By default Varnish ignores Cache-Control: nocache + (https://www.varnish-cache.org/docs/3.0/tutorial/increasing_your_hitrate.html#cache-control), so in order avoid caching it has to be done explicitly */ if (beresp.http.Pragma ~ "no-cache" || beresp.http.Cache-Control ~ "no-cache" ||