@@ -1906,6 +1906,57 @@ A list of cache pools to be created by the framework extension.
19061906
19071907 For more information about how pools works, see :ref: `cache pools <component-cache-cache-pools >`.
19081908
1909+ To configure a Redis cache pool with a default lifetime of 1 hour, do the following:
1910+
1911+ .. configuration-block ::
1912+
1913+ .. code-block :: yaml
1914+
1915+ # config/packages/framework.yaml
1916+ framework :
1917+ cache :
1918+ pools :
1919+ cache.mycache :
1920+ adapter : cache.adapter.redis
1921+ default_lifetime : 3600
1922+
1923+ .. code-block :: xml
1924+
1925+ <!-- config/packages/framework.xml -->
1926+ <?xml version =" 1.0" encoding =" UTF-8" ?>
1927+ <container xmlns =" http://symfony.com/schema/dic/services"
1928+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
1929+ xmlns : framework =" http://symfony.com/schema/dic/symfony"
1930+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
1931+ http://symfony.com/schema/dic/services/services-1.0.xsd
1932+ http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
1933+
1934+ <framework : config >
1935+ <framework : cache >
1936+ <framework : pool
1937+ name =" cache.mycache"
1938+ adapter =" cache.adapter.redis"
1939+ default-lifetime =3600
1940+ />
1941+ </framework : cache >
1942+ <!-- ... -->
1943+ </framework : config >
1944+ </container >
1945+
1946+ .. code-block :: php
1947+
1948+ // config/packages/framework.php
1949+ $container->loadFromExtension('framework', array(
1950+ 'cache' => array(
1951+ 'pools' => array(
1952+ 'cache.mycache' => array(
1953+ 'adapter' => 'cache.adapter.redis',
1954+ 'default_lifetime' => 3600,
1955+ ),
1956+ ),
1957+ ),
1958+ ));
1959+
19091960 .. _reference-cache-pools-name :
19101961
19111962name
@@ -1924,7 +1975,10 @@ adapter
19241975
19251976**type **: ``string `` **default **: ``cache.app ``
19261977
1927- The name of the adapter to use. You could also use your own implementation.
1978+ The service name of the adapter to use. You can specify one of the default
1979+ services that follow the pattern ``cache.adapter.[type] ``. Alternatively you
1980+ can specify another cache pool as base, which will make this pool inherit the
1981+ settings from the base pool as defaults.
19281982
19291983.. note ::
19301984
@@ -1960,7 +2014,10 @@ provider
19602014
19612015**type **: ``string ``
19622016
1963- The service name to use as provider when the specified adapter needs one.
2017+ Overwrite the default service name or DSN respectively, if you do not want to
2018+ use what is configured as ``default_X_provider `` under ``cache ``. See the
2019+ description of the default provider setting above for the type of adapter
2020+ you use for information on how to specify the provider.
19642021
19652022clearer
19662023"""""""
0 commit comments