mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-23 02:36:46 +00:00
perf(cache): use redis unlink for key deletion (#10658)
# Which Problems Are Solved The usage of the Redis `DEL` command showed blocking and slowdowns during load-tests. # How the Problems Are Solved Use [`UNLINK`](https://redis.io/docs/latest/commands/UNLINK/) instead. # Additional Changes - none # Additional Context - closes https://github.com/zitadel/zitadel/issues/8930
This commit is contained in:
6
internal/cache/connector/redis/_remove.lua
vendored
6
internal/cache/connector/redis/_remove.lua
vendored
@@ -3,8 +3,8 @@ local function remove(object_id)
|
||||
local keys = redis.call("SMEMBERS", setKey)
|
||||
local n = #keys
|
||||
for i = 1, n do
|
||||
redis.call("DEL", keys[i])
|
||||
redis.call("UNLINK", keys[i])
|
||||
end
|
||||
redis.call("DEL", setKey)
|
||||
redis.call("DEL", object_id)
|
||||
redis.call("UNLINK", setKey)
|
||||
redis.call("UNLINK", object_id)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user