File tree Expand file tree Collapse file tree 3 files changed +22
-3
lines changed Expand file tree Collapse file tree 3 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,15 @@ See below for the :ref:`flush() <flush>` method.
4343Invalidate 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
4756Refreshing 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
6583Invalidating With a Regular Expression
Original file line number Diff line number Diff line change 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.
Original file line number Diff line number Diff line change @@ -114,9 +114,7 @@ For instance::
114114Please note that purge will invalidate all variants, so you do not have to
115115send 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
121119Refresh
122120~~~~~~~
You can’t perform that action at this time.
0 commit comments