You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor #61162 [Semaphore] Enabled usage of EVALSHA and LOAD SCRIPT over regular EVAL (santysisi)
This PR was merged into the 7.4 branch.
Discussion
----------
[Semaphore] Enabled usage of `EVALSHA` and `LOAD SCRIPT` over regular `EVAL`
| Q | A
| ------------- | ---
| Branch? | 7.4
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Issues | no
| License | MIT
This PR updates the Semaphore component to use `EVALSHA` instead of `EVAL` when evaluating Lua scripts, following the same approach introduced in a previous [PR](#58533) for the Lock component. Reusing the cached `SHA` improves performance and avoids sending the full script each time.
Commits
-------
4afc680 [Semaphore] Enabled usage of `EVALSHA` and `LOAD SCRIPT` over regular `EVAL`
thrownewInvalidArgumentException(\sprintf('"%s()" expects being initialized with a Redis, RedisArray, RedisCluster or Predis\ClientInterface, "%s" given.', __METHOD__, get_debug_type($this->redis)));
@@ -183,4 +249,26 @@ private function getUniqueToken(Key $key): string
0 commit comments