Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
13 changes: 13 additions & 0 deletions configuration/override_dir_structure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,19 @@ named ``APP_CACHE_DIR`` whose value is the full path of the cache folder.
its own cached configuration files, and so each needs its own directory to
store those cache files.

In case you have multiple frontend servers using the same shared filesystem, you
can make use of the :method:`Symfony\\Component\\HttpKernel\\Kernel::getShareDir` method to
get a shared directory for cache and shared data. The shared directory can be set
by overriding an environment variable named ``APP_SHARE_DIR`` whose value is the full
path of the shared folder. This directory is also accessible as a container parameter
named ``%kernel.share_dir%``.

.. versionadded:: 7.4

The ``Kernel::getShareDir()`` method, the ``%kernel.share_dir`` parameter and
the support for the ``APP_SHARE_DIR`` environment variable were introduced
in Symfony 7.4.

.. _override-logs-dir:

Override the Log Directory
Expand Down
16 changes: 16 additions & 0 deletions reference/configuration/kernel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,22 @@ servers support it, and you have to use a long-running web server like `FrankenP
This parameter stores the value of
:ref:`the framework.secret parameter <configuration-framework-secret>`.

``kernel.share_dir``
--------------------

**type**: ``string`` **default**: ``$this->getCacheDir()``

This parameter stores the absolute path of the shared cache directory of your Symfony
application. The default value is the current cache directory.

This value is also exposed via the :method:`Symfony\\Component\\HttpKernel\\Kernel::getShareDir`
method of the kernel class, which you can override to return a different value.

.. versionadded:: 7.4

The ``Kernel::getShareDir()`` method and the ``%kernel.share_dir`` parameter
were introduced in Symfony 7.4.

``kernel.trust_x_sendfile_type_header``
---------------------------------------

Expand Down