From 9db81f57de2a6d303ffafefd280dfde9d4901b65 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 25 Sep 2019 14:48:50 +0200 Subject: [PATCH 1/3] remove the array adapter chapter --- .../cache/adapters/array_cache_adapter.rst | 27 ------------------- 1 file changed, 27 deletions(-) delete mode 100644 components/cache/adapters/array_cache_adapter.rst diff --git a/components/cache/adapters/array_cache_adapter.rst b/components/cache/adapters/array_cache_adapter.rst deleted file mode 100644 index ffdc1d60dd0..00000000000 --- a/components/cache/adapters/array_cache_adapter.rst +++ /dev/null @@ -1,27 +0,0 @@ -.. index:: - single: Cache Pool - single: Array Cache - -Array Cache Adapter -=================== - -Generally, this adapter is useful for testing purposes, as its contents are stored in memory -and not persisted outside the running PHP process in any way. It can also be useful while -warming up caches, due to the :method:`Symfony\\Component\\Cache\\Adapter\\ArrayAdapter::getValues` -method. - -This adapter can be passed a default cache lifetime as its first parameter, and a boolean that -toggles serialization as its second parameter:: - - use Symfony\Component\Cache\Adapter\ArrayAdapter; - - $cache = new ArrayAdapter( - - // the default lifetime (in seconds) for cache items that do not define their - // own lifetime, with a value 0 causing items to be stored indefinitely (i.e. - // until the current PHP process finishes) - $defaultLifetime = 0, - - // if ``true``, the values saved in the cache are serialized before storing them - $storeSerialized = true - ); From 5f0201b571ac92fcd980e8bad632cb8ede72d976 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 25 Sep 2019 15:00:33 +0200 Subject: [PATCH 2/3] remove unused use statements --- logging/handlers.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/logging/handlers.rst b/logging/handlers.rst index b7e0728471a..1682040e504 100644 --- a/logging/handlers.rst +++ b/logging/handlers.rst @@ -50,8 +50,6 @@ To use it, declare it as a service: .. code-block:: php // config/services.php - use App\Logger\SessionRequestProcessor; - use Monolog\Formatter\LineFormatter; use Symfony\Bridge\Monolog\Handler\ElasticsearchLogstashHandler; $container->register(ElasticsearchLogstashHandler::class); From 075c14d216464261397824331da147ea40d98ae3 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 25 Sep 2019 17:29:35 +0200 Subject: [PATCH 3/3] Restored the deleted adapter cache file --- .../cache/adapters/array_cache_adapter.rst | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 components/cache/adapters/array_cache_adapter.rst diff --git a/components/cache/adapters/array_cache_adapter.rst b/components/cache/adapters/array_cache_adapter.rst new file mode 100644 index 00000000000..ffdc1d60dd0 --- /dev/null +++ b/components/cache/adapters/array_cache_adapter.rst @@ -0,0 +1,27 @@ +.. index:: + single: Cache Pool + single: Array Cache + +Array Cache Adapter +=================== + +Generally, this adapter is useful for testing purposes, as its contents are stored in memory +and not persisted outside the running PHP process in any way. It can also be useful while +warming up caches, due to the :method:`Symfony\\Component\\Cache\\Adapter\\ArrayAdapter::getValues` +method. + +This adapter can be passed a default cache lifetime as its first parameter, and a boolean that +toggles serialization as its second parameter:: + + use Symfony\Component\Cache\Adapter\ArrayAdapter; + + $cache = new ArrayAdapter( + + // the default lifetime (in seconds) for cache items that do not define their + // own lifetime, with a value 0 causing items to be stored indefinitely (i.e. + // until the current PHP process finishes) + $defaultLifetime = 0, + + // if ``true``, the values saved in the cache are serialized before storing them + $storeSerialized = true + );