File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ Tag Name Usage
32
32
`kernel.event_listener `_ Listen to different events/hooks in Symfony
33
33
`kernel.event_subscriber `_ To subscribe to a set of different events/hooks in Symfony
34
34
`kernel.fragment_renderer `_ Add new HTTP content rendering strategies
35
+ `kernel.reset `_ Allows to clean up services between requests
35
36
`monolog.logger `_ Logging with a custom logging channel
36
37
`monolog.processor `_ Add a custom processor for logging
37
38
`routing.loader `_ Register a custom service that loads routes
@@ -632,6 +633,21 @@ To add a new rendering strategy - in addition to the core strategies like
632
633
:class: `Symfony\\ Component\\ HttpKernel\\ Fragment\\ FragmentRendererInterface `,
633
634
register it as a service, then tag it with ``kernel.fragment_renderer ``.
634
635
636
+ kernel.reset
637
+ ------------
638
+
639
+ **Purpose **: Clean up services between requests
640
+
641
+ During the ``kernel.terminate `` event, Symfony looks for any service tagged
642
+ with the ``kernel.reset `` tag to reinitialize their state. This is done by
643
+ calling to the method whose name is configured in the ``method `` argument of
644
+ the tag.
645
+
646
+ This is mostly useful when running your projects in application servers that
647
+ reuse the Symfony application between requests to improve performance. This tag
648
+ is applied for example to the built-in :doc: `data collectors </profiler/data_collector >`
649
+ of the profiler to delete all their information.
650
+
635
651
.. _dic_tags-monolog :
636
652
637
653
monolog.logger
You can’t perform that action at this time.
0 commit comments