Skip to content

Added the OPT_SERVER_TIMEOUT_LIMIT behaviour. #130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions memcached-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ class Memcached {

const OPT_SERVER_FAILURE_LIMIT;

const OPT_SERVER_TIMEOUT_LIMIT;

const OPT_CACHE_LOOKUPS;

const OPT_AUTO_EJECT_HOSTS;
Expand Down
3 changes: 3 additions & 0 deletions php_libmemcached_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ memcached_st *php_memc_create_str (const char *str, size_t str_len);
# define HAVE_LIBMEMCACHED_MEMCACHED 1
#endif

#if defined(LIBMEMCACHED_VERSION_HEX) && LIBMEMCACHED_VERSION_HEX >= 0x01000018
# define HAVE_MEMCACHED_BEHAVIOR_SERVER_TIMEOUT_LIMIT 1
#endif

#ifdef HAVE_MEMCACHED_INSTANCE_ST
typedef const memcached_instance_st * php_memcached_instance_st;
Expand Down
3 changes: 3 additions & 0 deletions php_memcached.c
Original file line number Diff line number Diff line change
Expand Up @@ -4351,6 +4351,9 @@ static void php_memc_register_constants(INIT_FUNC_ARGS)
#ifdef HAVE_MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS
REGISTER_MEMC_CLASS_CONST_LONG(OPT_REMOVE_FAILED_SERVERS, MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS);
#endif
#ifdef HAVE_MEMCACHED_BEHAVIOR_SERVER_TIMEOUT_LIMIT
REGISTER_MEMC_CLASS_CONST_LONG(OPT_SERVER_TIMEOUT_LIMIT, MEMCACHED_BEHAVIOR_SERVER_TIMEOUT_LIMIT);
#endif

/*
* libmemcached result codes
Expand Down