Skip to content

Link to FOSHttpCacheBundle #4175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we link to a Symfony bundle, should we link to its official home page (https://github.com/FriendsOfSymfony/FOSHttpCacheBundle in this case) or to its official documentation (http://foshttpcachebundle.readthedocs.org/ in this case)?

I don't know if there is an official policy set by the documentation maintainers: @weaverryan @wouterj @xabbuh

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Afaik there is no strict guideline regarding this. But linking to the official documentation seems reasonable to me since this is what people are usually interested in when reading the documentation. We do this in the Serializer Component documentation for the JMS Serializer for example (the CMF is linking to https://github.com/schmittjoh/JMSSerializerBundle btw., @wouterj).