Skip to content

Commit adc551f

Browse files
committed
feature symfony#4175 Link to FOSHttpCacheBundle (ddeboer)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes symfony#4175). Discussion ---------- Link to FOSHttpCacheBundle * Link to FOSHttpCacheBundle that can help with cache invalidation. * Qualify the strong negative opinion about cache invalidation, which we also find in the [Cache Invalidation section](http://symfony.com/doc/current/book/http_cache.html#http-cache-invalidation) in the docs. The cookbook (and docs) are too opiniated on this subject and offer no balanced view. We should not forget that [RFC 2616](http://tools.ietf.org/html/rfc2616#section-13.10) considers invalidation seriously. I would love to hear from the original authors of this doc section or any others what their arguments against invalidation are. Let’s try to introduce both benefits and drawbacks more carefully in the docs (e.g., as is done [here](http://foshttpcache.readthedocs.org/en/latest/invalidation-introduction.html)). Commits ------- 9243612 Link to FOSHttpCacheBundle
2 parents e9d317a + d246a93 commit adc551f

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

cookbook/cache/varnish.rst

+13-3
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,18 @@ Symfony2 adds automatically:
9191
Cache Invalidation
9292
------------------
9393

94-
You should never need to invalidate cached data because invalidation is already
95-
taken into account natively in the HTTP cache models (see :ref:`http-cache-invalidation`).
94+
If you want to cache content that changes frequently and still serve
95+
the most recent version to users, you need to invalidate that content.
96+
While `cache invalidation`_ allows you to purge content from your
97+
proxy before it has expired, it adds complexity to your caching setup.
9698

97-
Still, Varnish can be configured to accept a special HTTP ``PURGE`` method
99+
.. tip::
100+
101+
The open source `FOSHttpCacheBundle`_ takes the pain out of cache
102+
invalidation by helping you to organize your caching and
103+
invalidation setup.
104+
105+
Varnish can be configured to accept a special HTTP ``PURGE`` method
98106
that will invalidate the cache for a given resource:
99107

100108
.. code-block:: text
@@ -232,3 +240,5 @@ absolute URLs:
232240
.. _`Edge Architecture`: http://www.w3.org/TR/edge-arch
233241
.. _`GZIP and Varnish`: https://www.varnish-cache.org/docs/3.0/phk/gzip.html
234242
.. _`Surrogate-Capability Header`: http://www.w3.org/TR/edge-arch
243+
.. _`cache invalidation`: http://tools.ietf.org/html/rfc2616#section-13.10
244+
.. _`FOSHttpCacheBundle`: http://foshttpcachebundle.readthedocs.org/

0 commit comments

Comments
 (0)