Skip to content

[HttpKernel] Document the terminate_on_cache_hit option #16999

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 1 commit into from
Oct 5, 2022
Merged
Changes from all commits
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
16 changes: 16 additions & 0 deletions reference/configuration/framework.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,22 @@ which the cache can serve a stale response when an error is encountered
(default: 60). This setting is overridden by the stale-if-error HTTP
Cache-Control extension (see RFC 5861).

terminate_on_cache_hit
......................

**type**: ``boolean`` **default**: ``true``

If ``true``, the :ref:`kernel.terminate <component-http-kernel-kernel-terminate>`
event is dispatched even when the cache is hit.

Unless your application needs to process events on cache hits, it's recommended
to set this to ``false`` to improve performance, because it avoids having to
bootstrap the Symfony framework on a cache hit.

.. versionadded:: 6.2

The ``terminate_on_cache_hit`` option was introduced in Symfony 6.2.

.. _configuration-framework-http_method_override:

http_method_override
Expand Down