From 1782667a852dc72f5c26179e0ee6a515934793ef Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sun, 1 Jul 2018 11:27:28 +0200 Subject: [PATCH 1/2] [Cache] Add note about lazy=true option --- components/cache/adapters/redis_adapter.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/cache/adapters/redis_adapter.rst b/components/cache/adapters/redis_adapter.rst index dc8f9439204..b0eb6b180ee 100644 --- a/components/cache/adapters/redis_adapter.rst +++ b/components/cache/adapters/redis_adapter.rst @@ -96,6 +96,7 @@ array of ``key => value`` pairs representing option names and their respective v // associative array of configuration options array( + 'lazy' => false, 'persistent' => 0, 'persistent_id' => null, 'timeout' => 30, @@ -113,6 +114,10 @@ Available Options If none is specified, it will return ``\Redis`` if the ``redis`` extension is available, and ``\Predis\Client`` otherwise. +``lazy`` (type: ``bool``, default: ``false``) + Enables or disables lazy connections to the backend. Already set to ``true`` by default + when configuring Redis pools via FrameworkBundle. + ``persistent`` (type: ``int``, default: ``0``) Enables or disables use of persistent connections. A value of ``0`` disables persistent connections, and a value of ``1`` enables them. From 2407d97834b80e348d8b146be3715993d8294768 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 2 Jul 2018 09:54:42 +0200 Subject: [PATCH 2/2] Proposed a reword abut the "lazy" explanation --- components/cache/adapters/redis_adapter.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/cache/adapters/redis_adapter.rst b/components/cache/adapters/redis_adapter.rst index b0eb6b180ee..97be909534e 100644 --- a/components/cache/adapters/redis_adapter.rst +++ b/components/cache/adapters/redis_adapter.rst @@ -115,8 +115,9 @@ Available Options available, and ``\Predis\Client`` otherwise. ``lazy`` (type: ``bool``, default: ``false``) - Enables or disables lazy connections to the backend. Already set to ``true`` by default - when configuring Redis pools via FrameworkBundle. + Enables or disables lazy connections to the backend. It's ``false`` by + default when using this as a stand-alone component and ``true`` by default + when using it inside a Symfony application. ``persistent`` (type: ``int``, default: ``0``) Enables or disables use of persistent connections. A value of ``0`` disables persistent