I wrote and register this Redis Function:
local function stincr(KEYS, ARGS)
local value = redis.pcall('INCR', KEYS[1])
if value == 1 or value % 100 == 0 then
redis.call('ZADD', KEYS[2],'GT', tostring(value), KEYS[1])
end
return value;
end
redis.register_function('stincr', stincr)
Redis Functions are introduced in Redis 7. How can I call it with StackExchange.Redis?