@@ -250,6 +250,7 @@ For advanced configurations it could sometimes be useful to use a pool as an ada
250
250
# config/packages/cache.yaml
251
251
framework :
252
252
cache :
253
+ app : my_configured_app_cache
253
254
pools :
254
255
my_cache_pool :
255
256
adapter : cache.adapter.memcached
@@ -260,6 +261,10 @@ For advanced configurations it could sometimes be useful to use a pool as an ada
260
261
cache.long_cache :
261
262
adapter : my_cache_pool
262
263
default_lifetime : 604800
264
+ my_configured_app_cache :
265
+ # "cache.adapter.filesystem" is the default for "cache.app"
266
+ adapter : cache.adapter.filesystem
267
+ default_lifetime : 3600
263
268
264
269
.. code-block :: xml
265
270
@@ -272,10 +277,12 @@ For advanced configurations it could sometimes be useful to use a pool as an ada
272
277
https://symfony.com/schema/dic/services/services-1.0.xsd" >
273
278
274
279
<framework : config >
275
- <framework : cache >
280
+ <framework : cache app = " my_cache_pool " >
276
281
<framework : pool name =" my_cache_pool" adapter =" cache.adapter.memcached" provider =" memcached://user:[email protected] " />
277
282
<framework : pool name =" cache.short_cache" adapter =" my_cache_pool" default_lifetime =" 604800" />
278
283
<framework : pool name =" cache.long_cache" adapter =" my_cache_pool" default_lifetime =" 604800" />
284
+ <!-- "cache.adapter.filesystem" is the default for "cache.app" -->
285
+ <framework : pool name =" my_configured_app_cache" adapter =" cache.adapter.filesystem" default_lifetime =" 3600" />
279
286
</framework : cache >
280
287
</framework : config >
281
288
</container >
@@ -285,6 +292,7 @@ For advanced configurations it could sometimes be useful to use a pool as an ada
285
292
// config/packages/cache.php
286
293
$container->loadFromExtension('framework', [
287
294
'cache' => [
295
+ 'app' => 'my_configured_app_cache',
288
296
'pools' => [
289
297
'my_cache_pool' => [
290
298
'adapter' => 'cache.adapter.memcached',
@@ -298,6 +306,11 @@ For advanced configurations it could sometimes be useful to use a pool as an ada
298
306
'adapter' => 'cache.adapter.memcached',
299
307
'default_lifetime' => 604800,
300
308
],
309
+ 'my_configured_app_cache' => [
310
+ // "cache.adapter.filesystem" is the default for "cache.app"
311
+ 'adapter' => 'cache.adapter.filesystem',
312
+ 'default_lifetime' => 3600,
313
+ ],
301
314
],
302
315
],
303
316
]);
0 commit comments