@@ -1955,6 +1955,57 @@ A list of cache pools to be created by the framework extension.
19551955
19561956 For more information about how pools works, see :ref: `cache pools <component-cache-cache-pools >`.
19571957
1958+ To configure a Redis cache pool with a default lifetime of 1 hour, do the following:
1959+
1960+ .. configuration-block ::
1961+
1962+ .. code-block :: yaml
1963+
1964+ # config/packages/framework.yaml
1965+ framework :
1966+ cache :
1967+ pools :
1968+ cache.mycache :
1969+ adapter : cache.adapter.redis
1970+ default_lifetime : 3600
1971+
1972+ .. code-block :: xml
1973+
1974+ <!-- config/packages/framework.xml -->
1975+ <?xml version =" 1.0" encoding =" UTF-8" ?>
1976+ <container xmlns =" http://symfony.com/schema/dic/services"
1977+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
1978+ xmlns : framework =" http://symfony.com/schema/dic/symfony"
1979+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
1980+ http://symfony.com/schema/dic/services/services-1.0.xsd
1981+ http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
1982+
1983+ <framework : config >
1984+ <framework : cache >
1985+ <framework : pool
1986+ name =" cache.mycache"
1987+ adapter =" cache.adapter.redis"
1988+ default-lifetime =3600
1989+ />
1990+ </framework : cache >
1991+ <!-- ... -->
1992+ </framework : config >
1993+ </container >
1994+
1995+ .. code-block :: php
1996+
1997+ // config/packages/framework.php
1998+ $container->loadFromExtension('framework', array(
1999+ 'cache' => array(
2000+ 'pools' => array(
2001+ 'cache.mycache' => array(
2002+ 'adapter' => 'cache.adapter.redis',
2003+ 'default_lifetime' => 3600,
2004+ ),
2005+ ),
2006+ ),
2007+ ));
2008+
19582009 .. _reference-cache-pools-name :
19592010
19602011name
@@ -1973,7 +2024,10 @@ adapter
19732024
19742025**type **: ``string `` **default **: ``cache.app ``
19752026
1976- The name of the adapter to use. You could also use your own implementation.
2027+ The service name of the adapter to use. You can specify one of the default
2028+ services that follow the pattern ``cache.adapter.[type] ``. Alternatively you
2029+ can specify another cache pool as base, which will make this pool inherit the
2030+ settings from the base pool as defaults.
19772031
19782032.. note ::
19792033
@@ -2009,7 +2063,10 @@ provider
20092063
20102064**type **: ``string ``
20112065
2012- The service name to use as provider when the specified adapter needs one.
2066+ Overwrite the default service name or DSN respectively, if you do not want to
2067+ use what is configured as ``default_X_provider `` under ``cache ``. See the
2068+ description of the default provider setting above for the type of adapter
2069+ you use for information on how to specify the provider.
20132070
20142071clearer
20152072"""""""
0 commit comments