symfony/symfony-docs — pull request #3936 by gonzalovilaseca (2014-06-11 14:45:40+00:00)
Title: 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.