fix(仓储): 修复并发缓存前缀与软删除更新

补齐 Redis ZSET 前缀处理,确保并发释放计数正确

删除时改用 Client().Mutate 走更新逻辑,保留软删除记录

测试: make test-integration
This commit is contained in:
yangjianbo
2025-12-31 15:20:58 +08:00
parent 682f546c0e
commit d77d0544d0
2 changed files with 5 additions and 2 deletions

View File

@@ -330,7 +330,8 @@ func (h prefixHook) prefixCmd(cmd redisclient.Cmder) {
switch strings.ToLower(cmd.Name()) {
case "get", "set", "setnx", "setex", "psetex", "incr", "decr", "incrby", "expire", "pexpire", "ttl", "pttl",
"hgetall", "hget", "hset", "hdel", "hincrbyfloat", "exists":
"hgetall", "hget", "hset", "hdel", "hincrbyfloat", "exists",
"zadd", "zcard", "zrange", "zrangebyscore", "zrem", "zremrangebyscore", "zrevrange", "zrevrangebyscore", "zscore":
prefixOne(1)
case "del", "unlink":
for i := 1; i < len(args); i++ {