Skip to content

Commit 8d81ce3

Browse files
committed
Merge branch 'calumbrodie-patch-1'
2 parents 7dea240 + f1749c7 commit 8d81ce3

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

doc/cache-invalidator.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ 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();
53+
54+
.. include:: includes/custom-headers.rst
4655

4756
Refreshing Paths and URLs
4857
-------------------------
@@ -60,6 +69,15 @@ Refresh a URL::
6069

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

72+
Refresh a URL with added header(s)::
73+
74+
$cacheInvalidator->refreshPath(
75+
'http://www.example.com/users',
76+
array('Cookie' => 'foo=bar; fizz=bang')
77+
)->flush();
78+
79+
.. include:: includes/custom-headers.rst
80+
6381
.. _invalidate regex:
6482

6583
Invalidating With a Regular Expression

doc/includes/custom-headers.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This allows you to pass headers that are different between purge requests.
2+
If you want to add a header to all purge requests, such as ``Authorization``,
3+
use a :ref:`custom Guzzle client <custom Guzzle client>` instead.

doc/proxy-clients.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,7 @@ For instance::
114114
Please note that purge will invalidate all variants, so you do not have to
115115
send any headers that you vary on, such as ``Accept``.
116116

117-
The above allows you to pass headers that are different between purge requests.
118-
If you want to send headers for all purge requests, such as ``Authorization``,
119-
use a :ref:`custom Guzzle client <custom Guzzle client>` instead.
117+
.. include:: includes/custom-headers.rst
120118

121119
Refresh
122120
~~~~~~~

0 commit comments

Comments
 (0)