From 8646be7b81df58ec1c7d4ab41dfd58bb73afb356 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 7 Sep 2023 17:54:15 +0200 Subject: [PATCH] [Cache] Mention some details about cache.adapter.system --- cache.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cache.rst b/cache.rst index fd8e0d225af..b84bbb6f019 100644 --- a/cache.rst +++ b/cache.rst @@ -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 @@ -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 `. 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]``.