EZP-22400: Use FOSHttpCacheBundle

> https://jira.ez.no/browse/EZP-22400
> Depends on https://github.com/ezsystems/ezpublish-kernel/pull/1025

This adds:

* FOSHttpCacheBundle
* Varnish VCL samples

## TODO
* [x] Test with Varnish 3
* [x] Test with Varnish 4
What varnish caches there is the fact that this response URI can not be cached, to save that check in the next 120 seconds. It does not make the response public. However, if there is surrogate for Edi, it assumes you set a correct Vary header so it can (and should) cache a snippet even if its private.

----- Reply message -----
Von: "Jérôme Vieilledent" <notifications@github.com>
An: "ezsystems/ezpublish-community" <ezpublish-community@noreply.github.com>
Cc: "David Buchmann" <david@liip.ch>
Betreff: [ezpublish-community] EZP-22400: Use FOSHttpCacheBundle (#198)
Datum: Do., Okt. 30, 2014 17:13
In doc/varnish/vcl/varnish4.vcl: 
> + 
> +    // Optimize to only parse the Response contents from Symfony 
> +    if (beresp.http.Surrogate-Control ~ "ESI/1.0") { 
> +        unset beresp.http.Surrogate-Control; 
> +        set beresp.do_esi = true; 
> +    } 
> + 
> +    // Don't cache response with Set-Cookie 
> +    if (beresp.http.Set-Cookie) { 
> +        set beresp.ttl = 0s; 
> +        set beresp.uncacheable = true; 
> +        return (deliver); 
> +    } 
> + 
> +    // Respect the Cache-Control=private header from the backend 
> +    if (beresp.http.Cache-Control ~ "no-cache|no-store|private") { 

Sorry I don't get it :-/

About "hit for pass" cache, won't the cache be public then? 

&mdash;
Reply to this email directly or view it on GitHub. 
{"@context":"http://schema.org","@type":"EmailMessage","description":"View this Pull Request on GitHub","action":{"@type":"ViewAction","url":"https://github.com/ezsystems/ezpublish-community/pull/198/files#r19615642","name":"View Pull Request"}}