8000 [HttpKernel] Document the `terminate_on_cache_hit` option · symfony/symfony-docs@98a717a · GitHub
[go: up one dir, main page]

Skip to content

Commit 98a717a

Browse files
committed
[HttpKernel] Document the terminate_on_cache_hit option
1 parent 5970069 commit 98a717a

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
@@ -144,6 +144,22 @@ which the cache can serve a stale response when an error is encountered
144144
(default: 60). This setting is overridden by the stale-if-error HTTP
145145
Cache-Control extension (see RFC 5861).
146146

147+
terminate_on_cache_hit
148+
......................
149+
150+
**type**: ``boolean`` **default**: ``true``
151+
152+
If ``true``, the :ref:`kernel.terminate <component-http-kernel-kernel-terminate>`
153+
event is dispatched even when the cache is hit.
154+
155+
Unless your application needs to process events on cache hits, it's recommended
156+
to set this to ``false`` to improve performance, because it avoids having to
157+
bootstrap the Symfony framework on a cache hit.
158+
159+
.. versionadded:: 6.2
160+
161+
The ``terminate_on_cache_hit`` option was introduced in Symfony 6.2.
162+
147163
.. _configuration-framework-http_method_override:
148164

149165
http_method_override

0 commit comments

Comments
 (0)
0