Skip to content

Commit

Permalink
minor symfony#18846 [Cache] Mention some details about cache.adapter.…
Browse files Browse the repository at this point in the history
…system (javiereguiluz)

This PR was merged into the 5.4 branch.

Discussion
----------

[Cache] Mention some details about cache.adapter.system

Fixes symfony#12774.

Commits
-------

8646be7 [Cache] Mention some details about cache.adapter.system
  • Loading branch information
javiereguiluz committed Sep 8, 2023
2 parents d513550 + 8646be7 commit 8118c09
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ of:
Redis and Memcached are examples of such adapters. If a DSN is used as the
provider then a service is automatically created.

.. _cache-app-system:

There are two pools that are always enabled by default. They are ``cache.app`` and
``cache.system``. The system cache is used for things like annotations, serializer,
and validation. The ``cache.app`` can be used in your code. You can configure which
Expand Down Expand Up @@ -119,6 +121,13 @@ The Cache component comes with a series of adapters pre-configured:

``cache.adapter.redis_tag_aware`` has been introduced in Symfony 5.2.

.. note::

There's also a special ``cache.adapter.system`` adapter. It's recommended to
use it for the :ref:`system cache <cache-app-system>`. This adapter uses some
logic to dynamically select the best possible storage based on your system
(either PHP files or APCu).

Some of these adapters could be configured via shortcuts. Using these shortcuts
will create pools with service IDs that follow the pattern ``cache.[type]``.

Expand Down

0 comments on commit 8118c09

Please sign in to comment.