Skip to content

Commit 64a115d

Browse files
committed
Document memcached.sess_binary_protocol
And remove a TODO found in the code for allowing users to configure whether or not to use binary protocols for sessions. For issue #233
1 parent 52c644b commit 64a115d

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

memcached.ini

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ memcached.sess_prefix = "memc.sess.key."
3737
; default is Off
3838
memcached.sess_consistent_hash = Off
3939

40-
; Allow failed memcached server to automatically be removed
40+
; Allow failed memcached server to automatically be removed
4141
memcached.sess_remove_failed = 1
4242

4343
; Write data to a number of additional memcached servers
@@ -49,15 +49,17 @@ memcached.sess_remove_failed = 1
4949
; which could have old data or no data at all
5050
memcached.sess_number_of_replicas = 0
5151

52-
; memcached session binary mode
53-
; libmemcached replicas only work if binary mode is enabled
54-
memcached.sess_binary = Off
52+
; Use the memcached binary protocol for memcached sessions (Instead of the text protocol)
53+
; libmemcached replicas work only if binary mode is enabled.
54+
; However, certain proxies (such as twemproxy) will work only if the binary protocol is disabled.
55+
; Default is On. In older versions of php-memcached, this setting was Off and was called memcached.sess_binary.
56+
memcached.sess_binary_protocol = On
5557

5658
; memcached session replica read randomize
5759
memcached.sess_randomize_replica_read = Off
5860

5961
; memcached connect timeout value
60-
; In non-blocking mode this changes the value of the timeout
62+
; In non-blocking mode this changes the value of the timeout
6163
; during socket connection in milliseconds. Specifying -1 means an infinite timeout.
6264
memcached.sess_connect_timeout = 1000
6365

php_memcached.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
/* TODO
2020
* - set LIBKETAMA_COMPATIBLE as the default?
2121
* - fix unserialize(serialize($memc))
22-
* - ability to set binary protocol for sessions
2322
*/
2423

2524
#include "php_memcached.h"

0 commit comments

Comments
 (0)