symfony: Esi cache broken ? (started session / private response)

Q A
Bug report? yes
Symfony version 3.4.6

Hello,

I just finished upgrading from Symfony 2.8 to 3.4.6, and my http cache is broken when using AppCache (without debug).

It seems that since this PR, when the session is started, the response cache is set to private, which is fine.

But now when I go to a page where session is started and where I do render_esi(controller('MyBundle:Controller:action')), http cache is not working as before, because subrequests responses are made private even if I don’t start / use the session.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 4
  • Comments: 20 (18 by maintainers)

Commits related to this issue

Most upvoted comments

What if you use the firewall on the whole domain like: ^/, but not every response is user specific. Our varnish caching stopped working after the upgrade to Symfony 3.4. Even when explicitly setting caching headers on the response, those are overwritten by the listener.

For you shouldn’t the controller() specific call in the Twig template initiate a sub-request which the listener should ignore because it isn’t a master request?