You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -146,3 +153,26 @@ In the case of all commands which need to be directed at a node, the calling con
146
153
14. RANDOMKEY
147
154
15. PING
148
155
156
+
## Session Handler
157
+
You can use the cluster functionality of phpredis to store PHP session information in a Redis cluster as you can with a non cluster-enabled Redis instance.
158
+
159
+
To do this, you must configure your `session.save_handler` and `session.save_path` INI variables to give phpredis enough information to communicate with the cluster.
Set this variable to "rediscluster" to inform phpredis that this is a cluster instance.
168
+
169
+
### session.save_path
170
+
The save path for cluster based session storage takes the form of a PHP GET request, and requires that you specify at least on `seed` node. Other options you can specify are as follows:
171
+
172
+
*_timeout (double)_: The amount of time phpredis will wait when connecting or writing to the cluster.
173
+
*_read_timeout (double)_: The amount of time phpredis will wait for a result from the cluster.
174
+
*_persistent_: Tells phpredis whether persistent connections should be used.
175
+
*_distribute_: phpredis will randomly distribute session reads between masters and any attached slaves (load balancing).
176
+
*_failover (string)_: How phpredis should distribute session reads between master and slave nodes.
177
+
**_none_ : phpredis will only communicate with master nodes
178
+
**_error_: phpredis will communicate with master nodes unless one failes, in which case an attempt will be made to read session information from a slave.
0 commit comments