Skip to content

Commit b8e3310

Browse files
committed
minor #5468 [Cookbook][Templating] Add note about cache warming namespaced twig templates (kbond)
This PR was merged into the 2.3 branch. Discussion ---------- [Cookbook][Templating] Add note about cache warming namespaced twig templates | Q | A | ------------- | --- | Doc fix? | yes | New docs? | symfony/symfony#14764 | Applies to | 2.3 | Fixed tickets | #5391 Commits ------- cbd86ce add note about cache warming
2 parents 95b154c + cbd86ce commit b8e3310

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cookbook/templating/namespaced_paths.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@ directory:
7474
);
7575
));
7676
77+
.. caution::
78+
79+
Prior to 2.8, templates in custom namespaces are not pre-compiled by
80+
Symfony's cache warmup process. They are compiled on demand. This may
81+
cause problems if two simultaneous requests are trying to use the
82+
template for the first time.
83+
7784
The registered namespace is called ``foo_bar``, which refers to the
7885
``vendor/acme/foo-bar/templates`` directory. Assuming there's a file
7986
called ``sidebar.twig`` in that directory, you can use it easily:

0 commit comments

Comments
 (0)