File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ Tag Name Usage
25
25
`kernel.event_listener `_ Listen to different events/hooks in Symfony
26
26
`kernel.event_subscriber `_ To subscribe to a set of different events/hooks in Symfony
27
27
`kernel.fragment_renderer `_ Add new HTTP content rendering strategies
28
+ `kernel.reset `_ Allows to clean up services between requests
28
29
`monolog.logger `_ Logging with a custom logging channel
29
30
`monolog.processor `_ Add a custom processor for logging
30
31
`routing.loader `_ Register a custom service that loads routes
@@ -450,6 +451,21 @@ To add a new rendering strategy - in addition to the core strategies like
450
451
:class: `Symfony\\ Component\\ HttpKernel\\ Fragment\\ FragmentRendererInterface `,
451
452
register it as a service, then tag it with ``kernel.fragment_renderer ``.
452
453
454
+ kernel.reset
455
+ ------------
456
+
457
+ **Purpose **: Clean up services between requests
458
+
459
+ During the ``kernel.terminate `` event, Symfony looks for any service tagged
460
+ with the ``kernel.reset `` tag to reinitialize their state. This is done by
461
+ calling to the method whose name is configured in the ``method `` argument of
462
+ the tag.
463
+
464
+ This is mostly useful when running your projects in application servers that
465
+ reuse the Symfony application between requests to improve performance. This tag
466
+ is applied for example to the built-in :doc: `data collectors </profiler/data_collector >`
467
+ of the profiler to delete all their information.
468
+
453
469
.. _dic_tags-monolog :
454
470
455
471
monolog.logger
You can’t perform that action at this time.
0 commit comments