@@ -259,6 +259,7 @@ For advanced configurations it could sometimes be useful to use a pool as an ada
259259 # config/packages/cache.yaml
260260 framework :
261261 cache :
262+ app : my_configured_app_cache
262263 pools :
263264 my_cache_pool :
264265 adapter : cache.adapter.memcached
@@ -269,6 +270,10 @@ For advanced configurations it could sometimes be useful to use a pool as an ada
269270 cache.long_cache :
270271 adapter : my_cache_pool
271272 default_lifetime : 604800
273+ my_configured_app_cache :
274+ # "cache.adapter.filesystem" is the default for "cache.app"
275+ adapter : cache.adapter.filesystem
276+ default_lifetime : 3600
272277
273278 .. code-block :: xml
274279
@@ -281,10 +286,12 @@ For advanced configurations it could sometimes be useful to use a pool as an ada
281286 https://symfony.com/schema/dic/services/services-1.0.xsd" >
282287
283288 <framework : config >
284- <framework : cache >
289+ <framework : cache app = " my_cache_pool " >
285290 <framework : pool name =" my_cache_pool" adapter =" cache.adapter.memcached" provider =" memcached://user:password@example.com" />
286291 <framework : pool name =" cache.short_cache" adapter =" my_cache_pool" default_lifetime =" 604800" />
287292 <framework : pool name =" cache.long_cache" adapter =" my_cache_pool" default_lifetime =" 604800" />
293+ <!-- "cache.adapter.filesystem" is the default for "cache.app" -->
294+ <framework : pool name =" my_configured_app_cache" adapter =" cache.adapter.filesystem" default_lifetime =" 3600" />
288295 </framework : cache >
289296 </framework : config >
290297 </container >
@@ -294,6 +301,7 @@ For advanced configurations it could sometimes be useful to use a pool as an ada
294301 // config/packages/cache.php
295302 $container->loadFromExtension('framework', [
296303 'cache' => [
304+ 'app' => 'my_configured_app_cache',
297305 'pools' => [
298306 'my_cache_pool' => [
299307 'adapter' => 'cache.adapter.memcached',
@@ -307,6 +315,11 @@ For advanced configurations it could sometimes be useful to use a pool as an ada
307315 'adapter' => 'cache.adapter.memcached',
308316 'default_lifetime' => 604800,
309317 ],
318+ 'my_configured_app_cache' => [
319+ // "cache.adapter.filesystem" is the default for "cache.app"
320+ 'adapter' => 'cache.adapter.filesystem',
321+ 'default_lifetime' => 3600,
322+ ],
310323 ],
311324 ],
312325 ]);
0 commit comments