Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f6e6a8c

Browse filesBrowse files
committed
minor #20951 [Twig] [TwigBundle] Describe the new behaviour of twig.cache config (Okhoshi)
This PR was merged into the 7.3 branch. Discussion ---------- [Twig] [TwigBundle] Describe the new behaviour of twig.cache config Update the description of the `twig.cache` config to follow the changes implemented in symfony/symfony#54384. Fixes #20948 cc `@alexandre`-daubois Commits ------- 8c5f22b [TwigBundle] Describe the new behaviour of twig.cache config
2 parents 0ba6600 + 8c5f22b commit f6e6a8c
Copy full SHA for f6e6a8c

File tree

1 file changed

+11
-1
lines changed
Filter options

1 file changed

+11
-1
lines changed

‎reference/configuration/twig.rst

Copy file name to clipboardExpand all lines: reference/configuration/twig.rst
+11-1Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ application harder to maintain.
7171
cache
7272
~~~~~
7373

74-
**type**: ``string`` | ``false`` **default**: ``%kernel.cache_dir%/twig``
74+
**type**: ``string`` | ``boolean`` **default**: ``true``
7575

7676
Before using the Twig templates to render some contents, they are compiled into
7777
regular PHP code. Compilation is a costly process, so the result is cached in
@@ -82,6 +82,16 @@ is not recommended; not even in the ``dev`` environment, because the
8282
``auto_reload`` option ensures that cached templates which have changed get
8383
compiled again.
8484

85+
Specify the path where the cache should be stored. If set to ``true``, the cache
86+
defaults to ``%kernel.cache_dir%/twig``. However, if the ``auto_reload`` option is
87+
disabled and ``%kernel.build_dir%`` is different from ``%kernel.cache_dir%``,
88+
the cache will instead be stored in ``%kernel.build_dir%/twig``.
89+
90+
.. versionadded:: 7.3
91+
92+
Support for ``true`` value was added in Symfony 7.3, and it became the default
93+
value for this option instead of ``%kernel.cache_dir%/twig``.
94+
8595
charset
8696
~~~~~~~
8797

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.