diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 2be0b0e59c9..bdf463a8284 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -1955,6 +1955,57 @@ A list of cache pools to be created by the framework extension. For more information about how pools works, see :ref:`cache pools `. +To configure a Redis cache pool with a default lifetime of 1 hour, do the following: + +.. configuration-block:: + + .. code-block:: yaml + + # config/packages/framework.yaml + framework: + cache: + pools: + cache.mycache: + adapter: cache.adapter.redis + default_lifetime: 3600 + + .. code-block:: xml + + + + + + + + + + + + + + .. code-block:: php + + // config/packages/framework.php + $container->loadFromExtension('framework', array( + 'cache' => array( + 'pools' => array( + 'cache.mycache' => array( + 'adapter' => 'cache.adapter.redis', + 'default_lifetime' => 3600, + ), + ), + ), + )); + .. _reference-cache-pools-name: name @@ -1973,7 +2024,10 @@ adapter **type**: ``string`` **default**: ``cache.app`` -The name of the adapter to use. You could also use your own implementation. +The service name of the adapter to use. You can specify one of the default +services that follow the pattern ``cache.adapter.[type]``. Alternatively you +can specify another cache pool as base, which will make this pool inherit the +settings from the base pool as defaults. .. note:: @@ -2009,7 +2063,10 @@ provider **type**: ``string`` -The service name to use as provider when the specified adapter needs one. +Overwrite the default service name or DSN respectively, if you do not want to +use what is configured as ``default_X_provider`` under ``cache``. See the +description of the default provider setting above for the type of adapter +you use for information on how to specify the provider. clearer """""""