symfony/symfony — Issue #3233: How to cache only ESI with Varnish?
Author: ondrowan
Created: 2012-01-31 18:41:19+00:00
State: open

We have fairly big application (160req/s in average) built on Symfony with quite extensive use of ESI. So far we used Symfony reverse proxy which apparently isn't very suitable for such load (we have to clear cache every 2 hours, else it crashes). Logical next step is to get rid of this and move on to Varnish. However, documentation isn't that great and I have no idea how to set Varnish to process only ESI and not to cache whole pages. We use FOSUserBundle, but we cache only bits of page that aren't user specific, so I set Varnish to cache even pages containing cookies. I set ESI support according to Symfony cookbook and it still caches whole pages. Have anyone tried this before? Are there any gotchas that should be documented? I feel that many users would find really useful to have this kind of documentation in cookbook.