8000 clean up cache invalidation information on the cache chapter by dbu · Pull Request #4626 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

clean up cache invalidation information on the cache chapter #4626

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

Merged
merged 4 commits into from
Jan 3, 2015
Merged
Changes from 1 commit
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
Prev Previous commit
cleanup cache book chapter
  • Loading branch information
dbu committed Dec 27, 2014
commit 0accf631a5b97b95823721d262ba9eeded230418
16 changes: 9 additions & 7 deletions book/http_cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ header when none is set by the developer by following these rules:
``private`` directive automatically (except when ``s-maxage`` is set).

.. _http-expiration-validation:
.. _http-expiration-and-validation:

HTTP Expiration, Validation and Invalidation
--------------------------------------------
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok to change this section title?

Copy link
Member

Choose a reason for hiding this comment

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

yes, as long as you make it BC. (so adding a .. _http-expiration-and-validation: anchor

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, as long as you make it BC. (so adding a |..
_http-expiration-and-validation:| anchor

did that. looks a bit funny with the double anchor, however.

Expand Down Expand Up @@ -775,7 +776,7 @@ at some interval (the expiration) to verify that the content is still valid.
annotations. See the `FrameworkExtraBundle documentation`_.

.. index::
pair: Cache; Configuration
pair: Cache; Configuration
Copy link
Member

Choose a reason for hiding this comment

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

This should be reverted. We always use four spaces for indentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i was looking at other files. http_fundamentals.rst for example is aligning on index:: as well, so they also have 3 spaces. as is the rest of this file.


More Response Methods
~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -803,7 +804,7 @@ Additionally, most cache-related HTTP headers can be set via the single
));

.. index::
single: Cache; Invalidation
single: Cache; Invalidation
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a fourth space before the text?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i would like to keep it consistent with the rest of the doc where we seem to use 3 spaces for the indexes.

Copy link
Member

Choose a reason for hiding this comment

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

Hm, indeed, we are not really consistent here.


.. _http-cache-invalidation:

Expand All @@ -821,7 +822,7 @@ cache lifetimes, but to actively notify the gateway cache when content
changes. Reverse proxies usually provide a channel to receive such
notifications, typically through special HTTP requests.

.. warning::
.. caution::

While cache invalidation is powerful, avoid it when possible. If you fail
to invalidate something, outdated caches will be served for a potentially
Expand All @@ -846,7 +847,8 @@ that data from its cache.
a couple of common caching proxies.

If one content corresponds to one URL, the ``PURGE`` model works well.
You send a request to the cache proxy with the HTTP method ``PURGE`` instead
You send a request to the cache proxy with the HTTP method ``PURGE`` (using
the word "PURGE" is a convention, technically this can be any string) instead
of ``GET`` and make the cache proxy detect this and remove the data from the
cache instead of going to Symfony to get a response.

Expand Down Expand Up @@ -899,13 +901,13 @@ In many applications, the same content bit is used on various pages with
different URLs. More flexible concepts exist for those cases:

* **Banning** invalidates responses matching regular expressions on the
URL or other criteria.
URL or other criteria;
* **Cache tagging** lets you add a tag for each content used in a response
so that you can invalidate all URLs containing a certain content.

.. index::
single: Cache; ESI
single: ESI
single: Cache; ESI
single: ESI

.. _edge-side-includes:

Expand Down
0