@@ -15,9 +15,7 @@ Varnish Client
1515
1616At minimum, supply an array containing IPs or hostnames of the Varnish servers
1717that you want to send invalidation requests to. Make sure to include the port
18- Varnish runs on if it is not port 80.
19-
20- .. code-block :: php
18+ Varnish runs on if it is not port 80::
2119
2220 use FOS\HttpCache\ProxyClient\Varnish;
2321
@@ -26,9 +24,7 @@ Varnish runs on if it is not port 80.
2624
2725This is sufficient for invalidating absolute URLs. If you also wish to
2826invalidate relative paths, supply the hostname (or base URL) where your website
29- is available as the second parameter:
30-
31- .. code-block :: php
27+ is available as the second parameter::
3228
3329 $varnish = new Varnish($servers, 'my-cool-app.com');
3430
@@ -41,9 +37,7 @@ Nginx Client
4137
4238At minimum, supply an array containing IPs or hostnames of the Nginx servers
4339that you want to send invalidation requests to. Make sure to include the port
44- Nginx runs on if it is not port 80.
45-
46- .. code-block :: php
40+ Nginx runs on if it is not port 80::
4741
4842 use FOS\HttpCache\Invalidation\Nginx;
4943
@@ -52,16 +46,12 @@ Nginx runs on if it is not port 80.
5246
5347This is sufficient for invalidating absolute URLs. If you also wish to
5448invalidate relative paths, supply the hostname (or base URL) where your website
55- is available as the second parameter:
56-
57- .. code-block :: php
49+ is available as the second parameter::
5850
5951 $nginx = new Nginx($servers, 'my-cool-app.com');
6052
6153If you have configured Nginx to support purge requests at a separate location,
62- supply that location to the class as the third parameter:
63-
64- .. code-block :: php
54+ supply that location to the class as the third parameter::
6555
6656 $nginx = new Nginx($servers, 'my-cool-app.com', '/purge');
6757
10090If the caching proxy understands :term: `purge ` requests,
10191its client should implement ``PurgeInterface ``. Use the ``purge($url) `` method to
10292purge one specific URL. The URL can be either an absolute URL or a relative
103- path:
104-
105- .. code-block :: php
93+ path::
10694
10795 $client
10896 ->purge('http://my-app.com/some/path')
@@ -115,9 +103,7 @@ Refresh
115103
116104If the caching proxy understands :term: `refresh ` requests,
117105its client should implement ``RefreshInterface ``. Use ``refresh() `` to refresh
118- one specific URL. The URL can be either an absolute URL or a relative path:
119-
120- .. code-block :: php
106+ one specific URL. The URL can be either an absolute URL or a relative path::
121107
122108 $client
123109 ->refresh('http://my-app.com/some/path')
@@ -126,9 +112,7 @@ one specific URL. The URL can be either an absolute URL or a relative path:
126112 ;
127113
128114You can specify HTTP headers as the second argument to ``refresh() ``. For
129- instance, to only refresh the JSON representation of an URL:
130-
131- .. code-block :: php
115+ instance, to only refresh the JSON representation of an URL::
132116
133117 $client
134118 ->refresh('/some/path', array('Accept' => 'application/json')
@@ -146,31 +130,23 @@ You can invalidate all URLs matching a regular expression by using the
146130for the path to invalidate and an optional content type regular expression and
147131list of application hostnames.
148132
149- For instance, to ban all .png files on all application hosts:
150-
151- .. code-block :: php
133+ For instance, to ban all .png files on all application hosts::
152134
153135 $client->banPath('.*png$');
154136
155- To ban all HTML URLs that begin with ``/articles/ ``:
156-
157- .. code-block :: php
137+ To ban all HTML URLs that begin with ``/articles/ ``::
158138
159139 $client->banPath('/articles/.*', 'text/html');
160140
161141By default, URLs will be banned on all application hosts. You can limit this by
162- specifying a host header:
163-
164- .. code-block :: php
142+ specifying a host header::
165143
166144 $client->banPath('*.png$', null, '^www.example.com$');
167145
168146If you want to go beyond banning combinations of path, content type and hostname,
169147use the ``ban(array $headers) `` method. This method allows you to specify any
170148combination of headers that should be banned. For instance, when using the
171- Varnish client:
172-
173- .. code-block :: php
149+ Varnish client::
174150
175151 use FOS\HttpCache\ProxyClient\Varnish;
176152
0 commit comments