caching anon users', & auth users' ESI, content specifically in Laravel PHP framework apps?

grantksupport at grantksupport at
Tue Dec 16 18:58:52 CET 2014

I'm trying to get varnish to cooperate with (a new-installed) laravel php framework's sesion caching (

Currently, when using redis for session storage, laravel sets a COOKIE -- for both authenticated & anonymous users

	Cookie: laravel_session=eyJ...UifQ%3D%3D 

For anon users, and for ESI blocks with auth'd users, Varnish should cache.

What's the correct method for ensuring Varnish caches in these cases, when using a Laravel app?

Can/should it be handled only in Varnish VCL -- stripping the cookie?  If so, how's the ID of auth vs anon cookie best handled?

or, must in be done in concert with, or solely within, the Laravel app?

More information about the varnish-misc mailing list