@@ -96,9 +96,11 @@ array of ``key => value`` pairs representing option names and their respective v
96
96
97
97
// associative array of configuration options
98
98
array(
99
+ 'compression' => true,
99
100
'lazy' => false,
100
101
'persistent' => 0,
101
102
'persistent_id' => null,
103
+ 'tcp_keepalive' => 0,
102
104
'timeout' => 30,
103
105
'read_timeout' => 0,
104
106
'retry_interval' => 0,
@@ -114,6 +116,10 @@ Available Options
114
116
If none is specified, it will return ``\Redis `` if the ``redis `` extension is
115
117
available, and ``\Predis\Client `` otherwise.
116
118
119
+ ``compression `` (type: ``bool ``, default: ``true ``)
120
+ Enables or disables compression of items. This requires phpredis v4 or higher with
121
+ LZF support enabled.
122
+
117
123
``lazy `` (type: ``bool ``, default: ``false ``)
118
124
Enables or disables lazy connections to the backend. It's ``false `` by
119
125
default when using this as a stand-alone component and ``true `` by default
@@ -134,6 +140,10 @@ Available Options
134
140
Specifies the delay (in milliseconds) between reconnection attempts in case the client
135
141
loses connection with the server.
136
142
143
+ ``tcp_keepalive `` (type: ``int ``, default: ``0 ``)
144
+ Specifies the TCP-keepalive timeout of the connection. This requires phpredis v4 or
145
+ higher and a TCP-keepalive enabled server.
146
+
137
147
``timeout `` (type: ``int ``, default: ``30 ``)
138
148
Specifies the time (in seconds) used to connect to a Redis server before the
139
149
connection attempt times out.
@@ -149,3 +159,4 @@ Available Options
149
159
.. _`RedisCluster` : https://github.com/phpredis/phpredis/blob/master/cluster.markdown#readme
150
160
.. _`Predis` : https://packagist.org/packages/predis/predis
151
161
.. _`Predis Connection Parameters` : https://github.com/nrk/predis/wiki/Connection-Parameters#list-of-connection-parameters
162
+ .. _`TCP-keepalive` : https://redis.io/topics/clients#tcp-keepalive
0 commit comments