From b6a397bc8893469a9c0956ad56efe41797fad6e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Mon, 14 Jan 2019 15:50:34 +0100 Subject: [PATCH 1/2] [Composer] Add conflict for Twig 2.6.1 (#347) --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3dc806119b..39d3becda2 100644 --- a/composer.json +++ b/composer.json @@ -69,7 +69,8 @@ }, "conflict": { "symfony/symfony": "3.4.9||3.4.12||3.4.16", - "doctrine/dbal": "2.7.0" + "doctrine/dbal": "2.7.0", + "twig/twig": "2.6.1" }, "scripts": { "symfony-scripts": [ From 54b467b368e85ff15ea3bc93a974e96d2f6c28ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20R?= Date: Tue, 15 Jan 2019 21:48:20 +0100 Subject: [PATCH 2/2] [VCL-xkey] Align with httpcache package ref: https://github.com/ezsystems/ezplatform-http-cache/commit/fc6117d4435d28907429b686fae3d7d103028b9f Done: - Simplify logic around detecing hits as this seems to have been fixed Varnish 4.0.3 and we req 4.1: FriendsOfSymfony/FOSHttpCache@07cc5d7 - Make sure we check if obj.ttl is set before use for 4.1LTS use --- doc/varnish/vcl/varnish4_xkey.vcl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/varnish/vcl/varnish4_xkey.vcl b/doc/varnish/vcl/varnish4_xkey.vcl index 981e2a8b00..ef35d2e225 100644 --- a/doc/varnish/vcl/varnish4_xkey.vcl +++ b/doc/varnish/vcl/varnish4_xkey.vcl @@ -252,15 +252,15 @@ sub vcl_deliver { } } - if (client.ip ~ debuggers) { - # In Varnish 4 the obj.hits counter behaviour has changed, so we use a - # different method: if X-Varnish contains only 1 id, we have a miss, if it - # contains more (and therefore a space), we have a hit. - if (resp.http.x-varnish ~ " ") { + // Add X-Cache header if debugging is enabled + if (obj.hits > 0) { set resp.http.X-Cache = "HIT"; set resp.http.X-Cache-Hits = obj.hits; - set resp.http.X-Cache-TTL = obj.ttl; + // Not readable on Varnish 4.1LTS, so check for existence until we drop support for it in future versions + if (obj.ttl) { + set resp.http.X-Cache-TTL = obj.ttl; + } } else { set resp.http.X-Cache = "MISS"; }