Skip to content

Commit

Permalink
minor #5468 [Cookbook][Templating] Add note about cache warming names…
Browse files Browse the repository at this point in the history
…paced 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
  • Loading branch information
xabbuh committed Oct 3, 2015
2 parents 95b154c + cbd86ce commit b8e3310
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cookbook/templating/namespaced_paths.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ directory:
);
));
.. caution::

Prior to 2.8, templates in custom namespaces are not pre-compiled by
Symfony's cache warmup process. They are compiled on demand. This may
cause problems if two simultaneous requests are trying to use the
template for the first time.

The registered namespace is called ``foo_bar``, which refers to the
``vendor/acme/foo-bar/templates`` directory. Assuming there's a file
called ``sidebar.twig`` in that directory, you can use it easily:
Expand Down

0 comments on commit b8e3310

Please sign in to comment.