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 @@ -32,6 +32,7 @@ Tag Name Usage
3232`kernel.event_listener `_ Listen to different events/hooks in Symfony
3333`kernel.event_subscriber `_ To subscribe to a set of different events/hooks in Symfony
3434`kernel.fragment_renderer `_ Add new HTTP content rendering strategies
35+ `kernel.reset `_ Allows to clean up services between requests
3536`monolog.logger `_ Logging with a custom logging channel
3637`monolog.processor `_ Add a custom processor for logging
3738`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
632633:class: `Symfony\\ Component\\ HttpKernel\\ Fragment\\ FragmentRendererInterface `,
633634register it as a service, then tag it with ``kernel.fragment_renderer ``.
634635
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+
635651.. _dic_tags-monolog :
636652
637653monolog.logger
You can’t perform that action at this time.
0 commit comments