@@ -10,7 +10,13 @@ to work.
1010
1111The proxy client is also directly available as a service
1212(``fos_http_cache.proxy_client.default `` and ``fos_http_cache.proxy_client.varnish ``
13- or ``fos_http_cache.proxy_client.nginx ``) that you can use directly.
13+ , ``fos_http_cache.proxy_client.nginx `` or ``fos_http_cache.proxy_client.symfony ``)
14+ that you can use directly.
15+
16+ If you need to adjust the proxy client, you can also configure the ``CacheManager ``
17+ with a :ref: `custom proxy client <custom_proxy_client >` that you defined as a
18+ service. In that case, you do not need to configure anything in the
19+ ``proxy_client `` configuration section.
1420
1521varnish
1622-------
@@ -33,6 +39,10 @@ Comma-separated list of IP addresses or host names of your
3339caching proxy servers. The port those servers will be contacted
3440defaults to 80; you can specify a different port with ``:<port> ``.
3541
42+ When using a multi-server setup, make sure to include **all ** proxy servers in
43+ this list. Invalidation must happen on all systems or you will end up with
44+ inconsistent caches.
45+
3646``base_url ``
3747""""""""""""
3848
@@ -83,10 +93,24 @@ Separate location that purge requests will be sent to.
8393See the :ref: `FOSHttpCache library docs <foshttpcache:nginx configuration >`
8494on how to configure Nginx.
8595
96+ symfony
97+ -------
98+
99+ .. code-block :: yaml
100+
101+ # app/config/config.yml
102+ fos_http_cache :
103+ proxy_client :
104+ symfony :
105+ servers : 123.123.123.1:6060, 123.123.123.2
106+ base_url : yourwebsite.com
107+
108+ For ``servers `` and ``base_url ``, see above.
109+
86110default
87111-------
88112
89- **type **: ``enum `` **options **: ``varnish ``, ``nginx ``
113+ **type **: ``enum `` **options **: ``varnish ``, ``nginx ``, `` symfony ``
90114
91115.. code-block :: yaml
92116
@@ -95,27 +119,29 @@ default
95119 proxy_client :
96120 default : varnish
97121
98- The default proxy client that will be used by the cache manager.
99- You can *use Nginx and Varnish in parallel *. If you need to cache and
100- invalidate pages in both, you can configure both in this bundle.
101- The cache manager however will only use the default client.
122+ If there is only one proxy client, it is automatically the default. Only
123+ configure this if you configured more than one proxy client.
124+
125+ The default proxy client that will be used by the cache manager. You can
126+ *configure Nginx, Varnish and Symfony proxy clients in parallel *. There is
127+ however only one cache manager and it will only use the default client.
102128
103129Custom Guzzle Client
104130--------------------
105131
106132By default, the proxy client instantiates a `Guzzle client `_ to talk with the
107133caching proxy. If you need to customize the requests, for example to send a
108134basic authentication header, you can configure a service and specify that in
109- the ``guzzle_client `` option. A sample service definition for using basic
110- authentication looks like this:
135+ the ``guzzle_client `` option of any of the cache proxy clients. A sample
136+ service definition for using basic authentication looks like this:
111137
112138.. code-block :: yaml
113139
114140 # app/config/config.yml
115141 acme.varnish.guzzle.client :
116142 class : Guzzle\Service\Client
117143 calls :
118- - [setDefaultOption, [auth, [%varnish .username%, %varnish .password%, basic ]]]
144+ - [setDefaultOption, [auth, [%caching_proxy .username%, %caching_proxy .password%, basic ]]]
119145
120146 Caching Proxy Configuration
121147---------------------------
0 commit comments