Skip to content
Closed
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
20 changes: 17 additions & 3 deletions reference/dic_tags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -460,9 +460,23 @@ To register your warmer with Symfony, give it the ``kernel.cache_warmer`` tag:
->addTag('kernel.cache_warmer', array('priority' => 0))
;

The ``priority`` value is optional, and defaults to 0. This value can be
from -255 to 255, and the warmers will be executed in the order of their
priority.
.. note::

The ``priority`` value is optional, and defaults to 0.
The higher the priority, the sooner it gets executed.

Core Cache Warmers
~~~~~~~~~~~~~~~~~~

+-------------------------------------------------------------------------------------------+-----------+
| Cache Warmer Class Name | Priority |
+-------------------------------------------------------------------------------------------+-----------+
| :class:`Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\TemplatePathsCacheWarmer` | 20 |
+-------------------------------------------------------------------------------------------+-----------+
| :class:`Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\RouterCacheWarmer` | 0 |
+-------------------------------------------------------------------------------------------+-----------+
| :class:`Symfony\\Bundle\\TwigBundle\\CacheWarmer\\TemplateCacheCacheWarmer` | 0 |
+-------------------------------------------------------------------------------------------+-----------+

.. _dic-tags-kernel-event-listener:

Expand Down