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. 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/ 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.