From 25961bdb41031524fd610c02c2198f21c7e4a1e8 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Mon, 8 Apr 2019 19:00:16 +0200 Subject: [PATCH] Show how to configure lifetime for app.cache. This will fix #10988 --- cache.rst | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/cache.rst b/cache.rst index dda7fb7b688..0e76036b431 100644 --- a/cache.rst +++ b/cache.rst @@ -250,6 +250,7 @@ For advanced configurations it could sometimes be useful to use a pool as an ada # config/packages/cache.yaml framework: cache: + app: my_configured_app_cache pools: my_cache_pool: adapter: cache.adapter.memcached @@ -260,6 +261,10 @@ For advanced configurations it could sometimes be useful to use a pool as an ada cache.long_cache: adapter: my_cache_pool default_lifetime: 604800 + my_configured_app_cache: + # "cache.adapter.filesystem" is the default for "cache.app" + adapter: cache.adapter.filesystem + default_lifetime: 3600 .. code-block:: xml @@ -272,10 +277,12 @@ For advanced configurations it could sometimes be useful to use a pool as an ada https://symfony.com/schema/dic/services/services-1.0.xsd"> - + + + @@ -285,6 +292,7 @@ For advanced configurations it could sometimes be useful to use a pool as an ada // config/packages/cache.php $container->loadFromExtension('framework', [ 'cache' => [ + 'app' => 'my_configured_app_cache', 'pools' => [ 'my_cache_pool' => [ 'adapter' => 'cache.adapter.memcached', @@ -298,6 +306,11 @@ For advanced configurations it could sometimes be useful to use a pool as an ada 'adapter' => 'cache.adapter.memcached', 'default_lifetime' => 604800, ], + 'my_configured_app_cache' => [ + // "cache.adapter.filesystem" is the default for "cache.app" + 'adapter' => 'cache.adapter.filesystem', + 'default_lifetime' => 3600, + ], ], ], ]);