FriendsOfSymfony/FOSHttpCache — pull request #62 by joelwurtz (2014-05-13 16:15:18+00:00)
Title: Add tests for head request, and add cookies on a hit for pass action

Currently the HEAD request with the current test fixtures is always cached.

In fact varnish by default cache response even if there is a `Cache-Control: no-cache` (https://www.varnish-cache.org/trac/wiki/VCLExampleLongerCaching), so we need to tell varnish not to cache the head request by setting a max-age to 0.

In fact the head will be cached and hit each time, but will be refetched each time as it's not fresh anymore. Another solution will be to tell varnish to not save the head request if we have a no-cache.

This workflow show me also that when cache is not fresh, vcl_miss is not called so we need to add the cookies on the vcl_pass also, in case of the cache need to be refetched (not only for HEAD request)

I add the test for this case and the documentation.