@@ -96,8 +96,10 @@ 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
'persistent' => 0,
100
101
'persistent_id' => null,
102
+ 'tcp_keepalive' => 0,
101
103
'timeout' => 30,
102
104
'read_timeout' => 0,
103
105
'retry_interval' => 0,
@@ -113,6 +115,10 @@ Available Options
113
115
If none is specified, it will return ``\Redis `` if the ``redis `` extension is
114
116
available, and ``\Predis\Client `` otherwise.
115
117
118
+ ``compression `` (type: ``bool ``, default: ``true ``)
119
+ Enables or disables compression of items. This requires phpredis v4 or higher with
120
+ LZF support enabled.
121
+
116
122
``persistent `` (type: ``int ``, default: ``0 ``)
117
123
Enables or disables use of persistent connections. A value of ``0 `` disables persistent
118
124
connections, and a value of ``1 `` enables them.
@@ -128,6 +134,10 @@ Available Options
128
134
Specifies the delay (in milliseconds) between reconnection attempts in case the client
129
135
loses connection with the server.
130
136
137
+ ``tcp_keealive `` (type: ``int ``, default: ``0 ``)
138
+ Specifies the TCP-keepalive timeout of the connection. This requires phpredis v4 or
139
+ higher and a TCP-keepalive enabled server.
140
+
131
141
``timeout `` (type: ``int ``, default: ``30 ``)
132
142
Specifies the time (in seconds) used to connect to a Redis server before the
133
143
connection attempt times out.
@@ -143,3 +153,4 @@ Available Options
143
153
.. _`RedisCluster` : https://github.com/phpredis/phpredis/blob/master/cluster.markdown#readme
144
154
.. _`Predis` : https://packagist.org/packages/predis/predis
145
155
.. _`Predis Connection Parameters` : https://github.com/nrk/predis/wiki/Connection-Parameters#list-of-connection-parameters
156
+ .. _`TCP-keepalive` : https://redis.io/topics/clients#tcp-keepalive
0 commit comments