Skip to content

Commit 45a86a3

Browse files
committed
minor #16999 [HttpKernel] Document the terminate_on_cache_hit option (javiereguiluz)
This PR was squashed before being merged into the 6.2 branch. Discussion ---------- [HttpKernel] Document the `terminate_on_cache_hit` option Fixes #16919. Commits ------- 98a717a [HttpKernel] Document the `terminate_on_cache_hit` option
2 parents 5076e42 + 98a717a commit 45a86a3

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

reference/configuration/framework.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,22 @@ which the cache can serve a stale response when an error is encountered
158158
(default: 60). This setting is overridden by the stale-if-error HTTP
159159
Cache-Control extension (see RFC 5861).
160160

161+
terminate_on_cache_hit
162+
......................
163+
164+
**type**: ``boolean`` **default**: ``true``
165+
166+
If ``true``, the :ref:`kernel.terminate <component-http-kernel-kernel-terminate>`
167+
event is dispatched even when the cache is hit.
168+
169+
Unless your application needs to process events on cache hits, it's recommended
170+
to set this to ``false`` to improve performance, because it avoids having to
171+
bootstrap the Symfony framework on a cache hit.
172+
173+
.. versionadded:: 6.2
174+
175+
The ``terminate_on_cache_hit`` option was introduced in Symfony 6.2.
176+
161177
.. _configuration-framework-http_method_override:
162178

163179
http_method_override

0 commit comments

Comments
 (0)