-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
4.4
-
MOODLE_404_STABLE
Derived from https://tracker.moodle.org/browse/MDL-80815
Redis SETEX command has been deprecated for several years. - since 2.6.12: https://redis.io/commands/setex/ which was released back in 2013. The PHP Redis library calls straight through to the Redis server without manipulating the args at all, and the SETEX command may be removed at any point in the future, along with the currently used SETNX.
Looking at https://github.com/phpredis/phpredis/issues/2441, this is a known issue and the correct solution is to use the SET command, with various args.
I believe the correct solution centres around the set method with the nx and ex args, however there is a note in the Redis SET manual about avoiding this pattern in favour of Redis Redlock which would require redlock-php.
- Discovered while testing
-
MDL-80815 Simplify redis acquire_lock method
- Development in progress