Skip to content

Commit 0c99784

Browse files
committed
clarify cookie header cleaning for varnish vs symfony httpcache
1 parent b20ba13 commit 0c99784

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

doc/symfony-cache-configuration.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,8 @@ options through the constructor:
329329
RewriteEngine On
330330
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
331331

332+
.. _symfony_cookie_header:
333+
332334
Cleaning the Cookie Header
333335
^^^^^^^^^^^^^^^^^^^^^^^^^^
334336

doc/user-context.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,9 @@ is granted extra permissions by an administrator.
199199

200200
.. note::
201201

202-
If you base the user hash on the Cookie header, you should
203-
:ref:`clean up that header <cookie_header>` to make the hash request
204-
properly cacheable.
202+
If you base the user hash on the Cookie header, you should clean up that header
203+
to make the hash request properly cacheable: :ref:`Varnish <varnish_cookie_header>`,
204+
:ref:`Symfony HttpCache <symfony_cookie_header>`.
205205

206206
The Original Request
207207
--------------------

doc/varnish-configuration.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ request with :ref:`a proper user hash <return context hash>`.
364364
your own VCL.
365365

366366
.. _cookie_header:
367+
.. _varnish_cookie_header:
367368

368369
Cleaning the Cookie Header
369370
^^^^^^^^^^^^^^^^^^^^^^^^^^

src/SymfonyCache/CacheInvalidation.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use function class_alias;
1515
use function class_exists;
16+
1617
use Symfony\Component\HttpKernel\HttpKernelInterface;
1718
use Symfony\Component\HttpKernel\Kernel;
1819

0 commit comments

Comments
 (0)