From 6ab9c16c479014daf07ef5c534ac289f2e02d858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Ma=C5=82olepszy?= Date: Mon, 25 Aug 2014 22:52:51 +0200 Subject: [PATCH 1/3] fixes environment/application mistake --- cookbook/configuration/environments.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/configuration/environments.rst b/cookbook/configuration/environments.rst index f5042ee17f8..d4884e2223a 100644 --- a/cookbook/configuration/environments.rst +++ b/cookbook/configuration/environments.rst @@ -153,7 +153,7 @@ used by each is explicitly set:: // ... -As you can see, the ``prod`` key specifies that this environment will run +As you can see, the ``prod`` key specifies that this application will run in the ``prod`` environment. A Symfony2 application can be executed in any environment by using this code and changing the environment string. From d246a9318e9f36d524d4145d11994c2225bd96e4 Mon Sep 17 00:00:00 2001 From: David de Boer Date: Sun, 24 Aug 2014 19:00:02 +0200 Subject: [PATCH 2/3] Link to FOSHttpCacheBundle --- cookbook/cache/varnish.rst | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/cookbook/cache/varnish.rst b/cookbook/cache/varnish.rst index 03c0b690381..abbd56e6962 100644 --- a/cookbook/cache/varnish.rst +++ b/cookbook/cache/varnish.rst @@ -91,10 +91,18 @@ Symfony2 adds automatically: Cache Invalidation ------------------ -You should never need to invalidate cached data because invalidation is already -taken into account natively in the HTTP cache models (see :ref:`http-cache-invalidation`). +If you want to cache content that changes frequently and still serve +the most recent version to users, you need to invalidate that content. +While `cache invalidation`_ allows you to purge content from your +proxy before it has expired, it adds complexity to your caching setup. -Still, Varnish can be configured to accept a special HTTP ``PURGE`` method +.. tip:: + + The open source `FOSHttpCacheBundle`_ takes the pain out of cache + invalidation by helping you to organize your caching and + invalidation setup. + +Varnish can be configured to accept a special HTTP ``PURGE`` method that will invalidate the cache for a given resource: .. code-block:: text @@ -232,3 +240,5 @@ absolute URLs: .. _`Edge Architecture`: http://www.w3.org/TR/edge-arch .. _`GZIP and Varnish`: https://www.varnish-cache.org/docs/3.0/phk/gzip.html .. _`Surrogate-Capability Header`: http://www.w3.org/TR/edge-arch +.. _`cache invalidation`: http://tools.ietf.org/html/rfc2616#section-13.10 +.. _`FOSHttpCacheBundle`: http://foshttpcachebundle.readthedocs.org/ From e43bfa31349410d7a7fcb120285229a1a8a95378 Mon Sep 17 00:00:00 2001 From: Bruno Vitorino Date: Wed, 27 Aug 2014 16:16:55 +0200 Subject: [PATCH 3/3] Route description correction. The actual route is '/random/{limit}' and not '/number/{limit}'. (cherry picked from commit 0a4511345a82313cb6cc5fc0dae1351073f50c6a) --- book/page_creation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/page_creation.rst b/book/page_creation.rst index da550fa60e4..fd6889868d0 100644 --- a/book/page_creation.rst +++ b/book/page_creation.rst @@ -231,7 +231,7 @@ the new route that defines the URL of the page that you're about to create: The routing consists of two basic pieces: the ``path``, which is the URL that this route will match, and a ``defaults`` array, which specifies the controller that should be executed. The placeholder syntax in the path -(``{limit}``) is a wildcard. It means that ``/number/10``, ``/number/327`` +(``{limit}``) is a wildcard. It means that ``/random/10``, ``/random/327`` or any other similar URL will match this route. The ``{limit}`` placeholder parameter will also be passed to the controller so that you can use its value to generate the proper random number.