I dont understand why the cache -control header is not correctly interact. When I load the page for the second time I feel the power of the cache. I seems work. Bu the cache control header is not synchronized. It tell me there’s no cache.
This because the default VCL is forcing the cache to be private when delivered from Varnish, IF you are logged in with a user account (and not anonymous user), AND if the response varies by user hash (user permissions) which most responses does in eZ Platform.
There are two reasons for this:
eZ Platform currently uses s-maxage, aka setSharedMaxAge(), however this is only meant for the reverse proxy (Varnish, Fastly or Symfony Proxy) which we can purge, not for other internet proxies in-between server and client.
We also got concerns from some partners that by default they’d like that logged in users data is never cached in browser (normal maxage header) for security reasons when involving shared computers
So, this is why the default VCL is doing this, and you can change it if your site has different requirements. That is the nature of VCL, and other configurations.