Skip to content

Commit fcf4ecb

Browse files
committed
Minor reword
1 parent f6e6a8c commit fcf4ecb

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

reference/configuration/twig.rst

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,21 @@ 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
7878
the directory defined by this configuration option.
7979

80-
Set this option to ``false`` to disable Twig template compilation. However, this
81-
is not recommended; not even in the ``dev`` environment, because the
82-
``auto_reload`` option ensures that cached templates which have changed get
83-
compiled again.
80+
You can either specify a custom path where the cache should be stored (as a
81+
string) or use ``true`` to let Symfony decide the default path. When set to
82+
``true``, the cache is stored in ``%kernel.cache_dir%/twig`` by default. However,
83+
if ``auto_reload`` is disabled and ``%kernel.build_dir%`` differs from
84+
``%kernel.cache_dir%``, the cache will be stored in ``%kernel.build_dir%/twig`` instead.
8485

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``.
86+
Set this option to ``false`` to disable Twig template compilation. However, this
87+
is not recommended, not even in the ``dev`` environment, because the ``auto_reload``
88+
option ensures that cached templates which have changed get compiled again.
8989

9090
.. versionadded:: 7.3
9191

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``.
92+
Support for using ``true`` as a value was introduced in Symfony 7.3. It also
93+
became the default value for this option, replacing the explicit path
94+
``%kernel.cache_dir%/twig``.
9495

9596
charset
9697
~~~~~~~

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy