Skip to content

Commit

Permalink
Merge branch 'calumbrodie-patch-1'
Browse files Browse the repository at this point in the history
  • Loading branch information
ddeboer committed Aug 14, 2014
2 parents 7dea240 + f1749c7 commit 8d81ce3
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
18 changes: 18 additions & 0 deletions doc/cache-invalidator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ See below for the :ref:`flush() <flush>` method.
Invalidate a URL::

$cacheInvalidator->invalidatePath('http://www.example.com/users')->flush();
Invalidate a URL with added header(s)::

$cacheInvalidator->invalidatePath(
'http://www.example.com/users',
array('Cookie' => 'foo=bar; fizz=bang')
)->flush();

.. include:: includes/custom-headers.rst

Refreshing Paths and URLs
-------------------------
Expand All @@ -60,6 +69,15 @@ Refresh a URL::

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

Refresh a URL with added header(s)::

$cacheInvalidator->refreshPath(
'http://www.example.com/users',
array('Cookie' => 'foo=bar; fizz=bang')
)->flush();

.. include:: includes/custom-headers.rst

.. _invalidate regex:

Invalidating With a Regular Expression
Expand Down
3 changes: 3 additions & 0 deletions doc/includes/custom-headers.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This allows you to pass headers that are different between purge requests.
If you want to add a header to all purge requests, such as ``Authorization``,
use a :ref:`custom Guzzle client <custom Guzzle client>` instead.
4 changes: 1 addition & 3 deletions doc/proxy-clients.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,7 @@ For instance::
Please note that purge will invalidate all variants, so you do not have to
send any headers that you vary on, such as ``Accept``.

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

Refresh
~~~~~~~
Expand Down

0 comments on commit 8d81ce3

Please sign in to comment.