Skip to content

Commit 914337c

Browse files
committed
Merge branch 'patch-1' of github.com:calumbrodie/FOSHttpCache into calumbrodie-patch-1
2 parents 7dea240 + 4836698 commit 914337c

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

doc/cache-invalidator.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ See below for the :ref:`flush() <flush>` method.
4343
Invalidate a URL::
4444

4545
$cacheInvalidator->invalidatePath('http://www.example.com/users')->flush();
46+
47+
Invalidate a URL with added header(s)::
48+
49+
$cacheInvalidator->invalidatePath(
50+
'http://www.example.com/users',
51+
array('Cookie' => 'foo=bar; fizz=bang')
52+
)->flush();
4653

4754
Refreshing Paths and URLs
4855
-------------------------
@@ -60,6 +67,21 @@ Refresh a URL::
6067

6168
$cacheInvalidator->refreshPath('http://www.example.com/users')->flush();
6269

70+
Refresh a URL with added header(s)::
71+
72+
$cacheInvalidator->refreshPath(
73+
'http://www.example.com/users',
74+
array('Cookie' => 'foo=bar; fizz=bang')
75+
)->flush();
76+
77+
Optionally adding headers with invalidation request
78+
-------------------------------------------------------
79+
80+
.. note::
81+
If adding the same headers on every invalidation request it would be preferrable
82+
to apply these headers automatically rather than passing them explictly each time.
83+
You can use a custom guzzle client to achieve this. See `Custom Guzzle Client` under :doc:`proxy clients <proxy-clients>`.
84+
6385
.. _invalidate regex:
6486

6587
Invalidating With a Regular Expression

0 commit comments

Comments
 (0)