@@ -13,10 +13,21 @@ information), rather than individually.
1313
1414.. caution ::
1515
16- Whenever you share caches, make sure to not output any individual content
16+ Whenever you share caches, make sure to ** not output any individual content **
1717 like the user name. If you have individual parts of a page, you can load
18- those parts over AJAX requests or look into ESI _. Both approaches integrate
19- with the concepts presented in this chapter.
18+ those parts over AJAX requests or look into ESI _ and make the ESI sub
19+ response vary on the cookie or completely non-cached. Both approaches
20+ integrate with the concepts presented in this chapter.
21+
22+ You do **not want intermediary proxies to cache responses ** that depend on the
23+ context. If the client will not see a difference when his context changes
24+ (e.g. is removed from or added to groups on server side), you also do not
25+ want the clients to cache pages. Because ``VARY `` is used for the control
26+ of the caching proxy, it is not available to control clients. Often, the
27+ best solution is to mark your pages as private with a max-age of 0 and use
28+ the *custom TTL * mechanism (see the documentation for
29+ :ref: `Varnish <varnish_customttl >` or the
30+ :ref: `Symfony HttpCache <symfonycache_customttl >`).
2031
2132Overview
2233--------
@@ -40,6 +51,11 @@ Caching on user context works as follows:
4051 The appropriate user role dependent representation of ``/foo.php `` will
4152 then be returned to the client.
4253
54+ After this happened the first time, the hash can be cached by Varnish for this
55+ client, moving step 2-4 into the cache. After the page is in cache, subsequent
56+ requests from clients that got the same hash can be served from the cache as
57+ well.
58+
4359Proxy Client Configuration
4460--------------------------
4561
0 commit comments