Skip to content

Commit

Permalink
fix: 修复BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
Lansongxx committed Apr 16, 2024
1 parent 1e21d29 commit d529014
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion biz/application/service/hot.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ const luaScript = `local limit = 100
redis.call('ZADD', KEYS[1], ARGV[1], ARGV[2])
local currentSize = redis.call('ZCARD', KEYS[1])
if currentSize > limit then
redis.call('ZREMRANGEBYRANK', KEYS[1], 0, -(limit + 1))
redis.call('ZREMRANGEBYRANK', KEYS[1], 0, (current - limit + 1))
end
local lastScore = redis.call('ZREVRANGE', KEYS[1], -1, -1, 'WITHSCORES')
return lastScore
Expand Down

0 comments on commit d529014

Please sign in to comment.