Skip to content

Commit 86d539e

Browse files
authored
Merge pull request #520 from FriendsOfSymfony/invalidate-annotation-only-unsafe-requests-1
Explain invalidation applies to unsafe requests
2 parents f8de402 + 88f0d42 commit 86d539e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Resources/doc/reference/annotations.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ Invalidate a path::
2828
{
2929
}
3030

31+
When `editAction()` returns a successful response to an :term:`unsafe <safe>`
32+
HTTP request (POST, PUT, PATCH or DELETE), the paths `/articles` and
33+
`/articles/latest` will be invalidated.
34+
3135
See :doc:`/features/invalidation` for more information.
3236

3337
.. _invalidateroute:
@@ -47,6 +51,9 @@ Invalidate a route with parameters::
4751
{
4852
}
4953

54+
Similarly to ``@InvalidatePath`` above, any successful response to an
55+
:term:`unsafe <safe>` request will invalidate the two routes.
56+
5057
You can also use expressions_ in the route parameter values. This obviously
5158
:ref:`requires the ExpressionLanguage component <requirements>`. To invalidate
5259
route ``articles`` with the ``number`` parameter set to ``123``, do::

0 commit comments

Comments
 (0)