From 96d5e9de7092cd8d79e706ba84b43729826666ba Mon Sep 17 00:00:00 2001 From: "Andrew (Andrius) Marcinkevicius" Date: Sun, 11 Jan 2015 11:28:21 +0200 Subject: [PATCH] Update http_cache.rst | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 2.3 | Fixed tickets | --- book/http_cache.rst | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/book/http_cache.rst b/book/http_cache.rst index 658288f1958..eae091e92ab 100644 --- a/book/http_cache.rst +++ b/book/http_cache.rst @@ -856,7 +856,7 @@ If one content corresponds to one URL, the ``PURGE`` model works well. You send a request to the cache proxy with the HTTP method ``PURGE`` (using the word "PURGE" is a convention, technically this can be any string) instead of ``GET`` and make the cache proxy detect this and remove the data from the -cache instead of going to Symfony to get a response. +cache instead of going to the application to get a response. Here is how you can configure the Symfony reverse proxy to support the ``PURGE`` HTTP method:: @@ -877,7 +877,10 @@ Here is how you can configure the Symfony reverse proxy to support the } if ('127.0.0.1' !== $request->getClientIp()) { - return new Response('Invalid HTTP method', Response::HTTP_BAD_REQUEST); + return new Response( + 'Invalid HTTP method', + Response::HTTP_BAD_REQUEST + ); } $response = new Response(); @@ -987,8 +990,10 @@ First, to use ESI, be sure to enable it in your application configuration: + xsi:schemaLocation="http://symfony.com/schema/dic/services + http://symfony.com/schema/dic/services/services-1.0.xsd + http://symfony.com/schema/dic/symfony + http://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> @@ -1115,8 +1120,10 @@ that must be enabled in your configuration: + xsi:schemaLocation="http://symfony.com/schema/dic/services + http://symfony.com/schema/dic/services/services-1.0.xsd + http://symfony.com/schema/dic/symfony + http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">