Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

[Twig] [TwigBundle] Describe the new behaviour of twig.cache config#20951

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
javiereguiluz merged 1 commit intosymfony:7.3fromOkhoshi:ticket_20948
May 12, 2025
Merged
Changes fromall 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
12 changes: 11 additions & 1 deletionreference/configuration/twig.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -71,7 +71,7 @@ application harder to maintain.
cache
~~~~~

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

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

Specify the path where the cache should be stored. If set to ``true``, the cache
defaults to ``%kernel.cache_dir%/twig``. However, if the ``auto_reload`` option is
disabled and ``%kernel.build_dir%`` is different from ``%kernel.cache_dir%``,
the cache will instead be stored in ``%kernel.build_dir%/twig``.

.. versionadded:: 7.3

Support for ``true`` value was added in Symfony 7.3, and it became the default
value for this option instead of ``%kernel.cache_dir%/twig``.

charset
~~~~~~~

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp