Skip to content

Commit 77a8089

Browse files
author
Nicolas Van Eenaeme
committed
Added the OPT_SERVER_TIMEOUT_LIMIT behaviour.
The option MEMCACHED_BEHAVIOR_SERVER_TIMEOUT_LIMIT was added in libmemcached 1.0.18 (0x01000018). For more information see https://answers.launchpad.net/libmemcached/+question/239497 The merge request for libmemcached: https://code.launchpad.net/~493pocbrcycmdw7yksonho9o2qzz-o18bz-d18ecat4t1b76tkfi3vttrkfngli/libmemcached/feature-server_timeout
1 parent 03811a1 commit 77a8089

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

memcached-api.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ class Memcached {
6565

6666
const OPT_SERVER_FAILURE_LIMIT;
6767

68+
const OPT_SERVER_TIMEOUT_LIMIT;
69+
6870
const OPT_CACHE_LOOKUPS;
6971

7072
const OPT_AUTO_EJECT_HOSTS;

php_libmemcached_compat.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ memcached_st *php_memc_create_str (const char *str, size_t str_len);
4646
# define HAVE_LIBMEMCACHED_MEMCACHED 1
4747
#endif
4848

49+
#if defined(LIBMEMCACHED_VERSION_HEX) && LIBMEMCACHED_VERSION_HEX >= 0x01000018
50+
# define HAVE_MEMCACHED_BEHAVIOR_SERVER_TIMEOUT_LIMIT 1
51+
#endif
4952

5053
#ifdef HAVE_MEMCACHED_INSTANCE_ST
5154
typedef const memcached_instance_st * php_memcached_instance_st;

php_memcached.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4351,6 +4351,9 @@ static void php_memc_register_constants(INIT_FUNC_ARGS)
43514351
#ifdef HAVE_MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS
43524352
REGISTER_MEMC_CLASS_CONST_LONG(OPT_REMOVE_FAILED_SERVERS, MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS);
43534353
#endif
4354+
#ifdef HAVE_MEMCACHED_BEHAVIOR_SERVER_TIMEOUT_LIMIT
4355+
REGISTER_MEMC_CLASS_CONST_LONG(OPT_SERVER_TIMEOUT_LIMIT, MEMCACHED_BEHAVIOR_SERVER_TIMEOUT_LIMIT);
4356+
#endif
43544357

43554358
/*
43564359
* libmemcached result codes

0 commit comments

Comments
 (0)