Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichael-grunder <michael.grunder@gmail.com>2017-11-11 00:46:48 +0300
committermichael-grunder <michael.grunder@gmail.com>2017-11-11 00:46:48 +0300
commitb63d79958e0f6b5abc6eaa6f720b4bfb17eb2e8f (patch)
treed863aabf6b8275d5cba0503120752ac2d47c334d /php_redis.h
parentf2162e5a6a92522371e177e840a17485d6eaa0b2 (diff)
Refactored session locking logic
* Use a precalculated SHA1 of our lock release script and first attempt to EVALSHA the script while falling back to EVAL if that fails. This means that the very first time we attempt to release a lock after server restart or script cache will fail but subsequent attempts will succeed as Redis will cache the script automatically. * Reorganized the new locking prototypes by making them static and removing them from the header file as they never need to be called from outside of redis_session.c anyway. Did the same for the lock_secret structure as we don't need to expose the structure externally. * Consolidated allocation and deallocation of lock pointers such that our redis_pool "constructor" and "desctructor" handle that as well. * Updating how we release the lock means we no longer need the new REDIS_G module globals, so those were removed. * HOST_NAME_MAX doesn't exist on OSX so added some preprocessor logic around that Still a WIP as it needs more testing as I'm sure I broke *something* :-)
Diffstat (limited to 'php_redis.h')
-rw-r--r--php_redis.h13
1 files changed, 0 insertions, 13 deletions
diff --git a/php_redis.h b/php_redis.h
index 9d47e058..d3272465 100644
--- a/php_redis.h
+++ b/php_redis.h
@@ -260,19 +260,6 @@ PHP_REDIS_API int redis_sock_read_multibulk_multi_reply_loop(
INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, zval *z_tab,
int numElems);
-ZEND_BEGIN_MODULE_GLOBALS(redis)
- int lock_release_lua_script_uploaded;
- char *lock_release_lua_script_hash;
-ZEND_END_MODULE_GLOBALS(redis)
-
-ZEND_EXTERN_MODULE_GLOBALS(redis);
-
-#ifdef ZTS
-#define REDIS_G(v) TSRMG(redis_globals_id, zend_redis_globals *, v)
-#else
-#define REDIS_G(v) (redis_globals.v)
-#endif
-
extern zend_module_entry redis_module_entry;
#define redis_module_ptr &redis_module_entry