Notes about caching pages with a CSRF Form

| Q             | A
| ------------- | ---
| Doc fix?      | no
| New docs?     | no
| Applies to    | all
| Fixed tickets | #1216
varnish by default does not cache the response to a request that contains a cookie (the browser got a cookie and is sending it) and neither a response that contains setting a cookie.

you can force varnish to cache requests with cookies, but when its about session cookies, you would at the same time have the vcl_hash function (that determines a unique hash for each request) use the cookie value in that hash. that way you cache separately for each user. with esi, this can make sense, especially if you can do it only for some of the subrequest and remove cookies on others that do not need it.