Description
Description
The existing RedisStore implementation does not benefit from caching of the LUA scripts being sent to Redis.
This means that on each call to delete/save/release etc a lock in Redis, the same script is being sent over the network.
In our set-up, after modifying the implementation to benefit from LOAD SCRIPT and EVALSHA instead of plain EVAL, we saw a network bytes in drop in half (from ~140 MB to ~ 80 MB).
Also an increase of operations throughput in Redis was observed due to less network congestion/waiting for the script to be transferred each time before the Redis operation can be executed.
I noticed that this was already mentioned in #40883 and dropped due to it no being worth the extra complexity.
Based on my observations, this is wasteful in terms of network i/o and somewhat bottlenecking performance when employing locks, especially when using both read locks and write locks (acquireRead and acquire functions of Symfony\Component\Lock\Lock.php)
I can submit a PR which makes use of LOAD SCRIPT and EVALSHA instead.
@nicolas-grekas please reconsider merging this feature!
Example
No response