@@ -73,10 +73,11 @@ adapter (template) they use by using the ``app`` and ``system`` key like:
7373xsi : schemaLocation =" http://symfony.com/schema/dic/services
7474 https://symfony.com/schema/dic/services/services-1.0.xsd
7575 http://symfony.com/schema/dic/symfony
76- https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
77-
76+ https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"
77+ >
7878 <framework : config >
79- <framework : cache app =" cache.adapter.filesystem"
79+ <framework : cache
80+ app =" cache.adapter.filesystem"
8081system =" cache.adapter.system"
8182 />
8283 </framework : config >
@@ -94,7 +95,6 @@ adapter (template) they use by using the ``app`` and ``system`` key like:
9495 ;
9596 };
9697
97-
9898 The Cache component comes with a series of adapters pre-configured:
9999
100100*:doc: `cache.adapter.apcu </components/cache/adapters/apcu_adapter >`
@@ -137,8 +137,8 @@ will create pools with service IDs that follow the pattern ``cache.[type]``.
137137xsi : schemaLocation =" http://symfony.com/schema/dic/services
138138 https://symfony.com/schema/dic/services/services-1.0.xsd
139139 http://symfony.com/schema/dic/symfony
140- https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
141-
140+ https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"
141+ >
142142 <framework : config >
143143<!--
144144 default_psr6_provider: Service: cache.psr6
@@ -229,8 +229,8 @@ You can also create more customized pools:
229229xsi : schemaLocation =" http://symfony.com/schema/dic/services
230230 https://symfony.com/schema/dic/services/services-1.0.xsd
231231 http://symfony.com/schema/dic/symfony
232- https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
233-
232+ https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"
233+ >
234234 <framework : config >
235235 <framework : cache default-memcached-provider =" memcached://localhost" >
236236<!-- creates a "custom_thing.cache" service
@@ -331,6 +331,8 @@ with either :class:`Symfony\\Contracts\\Cache\\CacheInterface` or
331331
332332# config/services.yaml
333333services :
334+ # ...
335+
334336app.cache.adapter.redis :
335337parent :' cache.adapter.redis'
336338tags :
@@ -343,9 +345,11 @@ with either :class:`Symfony\\Contracts\\Cache\\CacheInterface` or
343345 <container xmlns =" http://symfony.com/schema/dic/services"
344346xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
345347xsi : schemaLocation =" http://symfony.com/schema/dic/services
346- https://symfony.com/schema/dic/services/services-1.0.xsd" >
347-
348+ https://symfony.com/schema/dic/services/services-1.0.xsd"
349+ >
348350 <services >
351+ <!-- ...-->
352+
349353 <service id =" app.cache.adapter.redis" parent =" cache.adapter.redis" >
350354 <tag name =" cache.pool" namespace =" my_custom_namespace" />
351355 </service >
@@ -357,12 +361,14 @@ with either :class:`Symfony\\Contracts\\Cache\\CacheInterface` or
357361 // config/services.php
358362 namespace Symfony\Component\DependencyInjection\Loader\Configurator;
359363
360- return function(ContainerConfigurator $configurator) {
361- $services = $configurator->services();
364+ return function(ContainerConfigurator $container) {
365+ $container->services()
366+ // ...
362367
363- $services->set('app.cache.adapter.redis')
364- ->parent('cache.adapter.redis')
365- ->tag('cache.pool', ['namespace' => 'my_custom_namespace']);
368+ ->set('app.cache.adapter.redis')
369+ ->parent('cache.adapter.redis')
370+ ->tag('cache.pool', ['namespace' => 'my_custom_namespace'])
371+ ;
366372 };
367373
368374 Custom Provider Options
@@ -404,11 +410,14 @@ and use that when configuring the pool.
404410xsi : schemaLocation =" http://symfony.com/schema/dic/services
405411 https://symfony.com/schema/dic/services/services-1.0.xsd
406412 http://symfony.com/schema/dic/symfony
407- https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
408-
413+ https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"
414+ >
409415 <framework : config >
410416 <framework : cache >
411- <framework : pool name =" cache.my_redis" adapter =" cache.adapter.redis" provider =" app.my_custom_redis_provider" />
417+ <framework : pool name =" cache.my_redis"
418+ adapter =" cache.adapter.redis"
419+ provider =" app.my_custom_redis_provider"
420+ />
412421 </framework : cache >
413422 </framework : config >
414423
@@ -427,6 +436,8 @@ and use that when configuring the pool.
427436 ..code-block ::php
428437
429438 // config/packages/cache.php
439+ namespace Symfony\Component\DependencyInjection\Loader\Configurator;
440+
430441 use Symfony\Component\Cache\Adapter\RedisAdapter;
431442 use Symfony\Component\DependencyInjection\ContainerBuilder;
432443 use Symfony\Config\FrameworkConfig;
@@ -490,11 +501,14 @@ Symfony stores the item automatically in all the missing pools.
490501xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
491502xmlns : framework =" http://symfony.com/schema/dic/symfony"
492503xsi : schemaLocation =" http://symfony.com/schema/dic/services
493- https://symfony.com/schema/dic/services/services-1.0.xsd" >
494-
504+ https://symfony.com/schema/dic/services/services-1.0.xsd
505+ http://symfony.com/schema/dic/symfony
506+ https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"
507+ >
495508 <framework : config >
496509 <framework : cache >
497- <framework : pool name =" my_cache_pool" default-lifetime =" 31536000" >
510+ <framework : pool name =" my_cache_pool"
511+ default-lifetime =" 31536000" ><!-- One year-->
498512 <framework : adapter name =" cache.adapter.array" />
499513 <framework : adapter name =" cache.adapter.apcu" />
500514 <framework : adapter name =" cache.adapter.redis" provider =" redis://user:password@example.com" />
@@ -585,11 +599,14 @@ to enable this feature. This could be added by using the following configuration
585599xsi : schemaLocation =" http://symfony.com/schema/dic/services
586600 https://symfony.com/schema/dic/services/services-1.0.xsd
587601 http://symfony.com/schema/dic/symfony
588- https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
589-
602+ https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"
603+ >
590604 <framework : config >
591605 <framework : cache >
592- <framework : pool name =" my_cache_pool" adapter =" cache.adapter.redis" tags =" true" />
606+ <framework : pool name =" my_cache_pool"
607+ adapter =" cache.adapter.redis"
608+ tags =" true"
609+ />
593610 </framework : cache >
594611 </framework : config >
595612 </container >
@@ -633,12 +650,17 @@ achieved by specifying the adapter.
633650xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
634651xmlns : framework =" http://symfony.com/schema/dic/symfony"
635652xsi : schemaLocation =" http://symfony.com/schema/dic/services
636- https://symfony.com/schema/dic/services/services-1.0.xsd" >
637-
653+ https://symfony.com/schema/dic/services/services-1.0.xsd
654+ http://symfony.com/schema/dic/symfony
655+ https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"
656+ >
638657 <framework : config >
639658 <framework : cache >
640- <framework : pool name =" my_cache_pool" adapter =" cache.adapter.redis" tags =" tag_pool" />
641- <framework : pool name =" tag_pool" adapter =" cache.adapter.apcu" />
659+ <framework : pool name =" my_cache_pool"
660+ adapter =" cache.adapter.redis"
661+ tags =" tag_pool"
662+ />
663+ <framework : pool name =" tag_pool" adapter =" cache.adapter.apcu" />
642664 </framework : cache >
643665 </framework : config >
644666 </container >