Skip to content

Commit

Permalink
Merge branch '2.4' into 2.5
Browse files Browse the repository at this point in the history
* 2.4:
  Route description correction.
  Link to FOSHttpCacheBundle
  fixes environment/application mistake
  • Loading branch information
weaverryan committed Sep 1, 2014
2 parents cea3fa6 + a7738ca commit 0d2bf4f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion book/page_creation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
16 changes: 13 additions & 3 deletions cookbook/cache/varnish.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/
2 changes: 1 addition & 1 deletion cookbook/configuration/environments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 0d2bf4f

Please sign in to comment.