@@ -96,8 +96,10 @@ array of ``key => value`` pairs representing option names and their respective v
9696
9797 // associative array of configuration options
9898 array(
99+ 'compression' => true,
99100 'persistent' => 0,
100101 'persistent_id' => null,
102+ 'tcp_keepalive' => 0,
101103 'timeout' => 30,
102104 'read_timeout' => 0,
103105 'retry_interval' => 0,
@@ -113,6 +115,10 @@ Available Options
113115 If none is specified, it will return ``\Redis `` if the ``redis `` extension is
114116 available, and ``\Predis\Client `` otherwise.
115117
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+
116122``persistent `` (type: ``int ``, default: ``0 ``)
117123 Enables or disables use of persistent connections. A value of ``0 `` disables persistent
118124 connections, and a value of ``1 `` enables them.
@@ -128,6 +134,10 @@ Available Options
128134 Specifies the delay (in milliseconds) between reconnection attempts in case the client
129135 loses connection with the server.
130136
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+
131141``timeout `` (type: ``int ``, default: ``30 ``)
132142 Specifies the time (in seconds) used to connect to a Redis server before the
133143 connection attempt times out.
@@ -143,3 +153,4 @@ Available Options
143153.. _`RedisCluster` : https://github.com/phpredis/phpredis/blob/master/cluster.markdown#readme
144154.. _`Predis` : https://packagist.org/packages/predis/predis
145155.. _`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