Skip to content

Commit

Permalink
Move custom header to include
Browse files Browse the repository at this point in the history
  • Loading branch information
ddeboer committed Aug 14, 2014
1 parent 914337c commit f1749c7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
10 changes: 3 additions & 7 deletions doc/cache-invalidator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ Invalidate a URL with added header(s)::
array('Cookie' => 'foo=bar; fizz=bang')
)->flush();

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

Refreshing Paths and URLs
-------------------------

Expand All @@ -74,13 +76,7 @@ Refresh a URL with added header(s)::
array('Cookie' => 'foo=bar; fizz=bang')
)->flush();

Optionally adding headers with invalidation request
-------------------------------------------------------

.. note::
If adding the same headers on every invalidation request it would be preferrable
to apply these headers automatically rather than passing them explictly each time.
You can use a custom guzzle client to achieve this. See `Custom Guzzle Client` under :doc:`proxy clients <proxy-clients>`.
.. include:: includes/custom-headers.rst

.. _invalidate regex:

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 f1749c7

Please sign in to comment.