Hi,

Imagine that :
Your main page have a s-maxage of 180 minutes and a max-age set to 60
minutes. This page is in the proxy cache and its Age is 179 minutes.
If your client request this page at that precise time, it will receive
the proxy-cached version and will be told to store it in browser cache
for 60 minutes. If you request the page two minutes later, the page
will be the one from your browser cache but the server-side page might
have change!

Now imagine that with different s-maxage for your different ESI and it
can rapidly become a nightmare ;)

On Tue, Jul 5, 2011 at 6:19 PM, matty <[email protected]> wrote:
> In the docs http://symfony.com/doc/2.0/book/http_cache.html we have
> the following note:
>
> "Once you start using ESI, remember to always use the s-maxage
> directive instead of max-age. As the browser only ever receives the
> aggregated resource, it is not aware of the sub-components, and so it
> will obey the max-age directive and cache the entire page. And you
> don't want that."
>
>
> Let's suppose we have page cache expiration set to 3h. The page sub-
> component is valid in cache for 6h.
>
> When we use max-age the page can be saved in shared and private caches
> for 3 hours (and then validate based on etag/last-modified headers).
>
> Can you explain to me why I should not want browsers to cache the
> entire page?
>
> I have also seen that using Symfony2 gateway cache (even without ESI)
> results in sending cache-control no-cache headers. It's probably
> related with this - so can you explain why?
>
> Thanks in advance.
>
> --
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/symfony-devs?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to