推荐: blog.csdn.net/aquester https://github.com/eyjian https://www.cnblogs.com/aquester http://blog.chinaunix.net/uid/20682147.html
全部博文(594)
分类: C/C++
2016-09-08 00:06:53
Aquester2016-11-16 19:27:32
Aquester:http://redis.io/commands/incr
If for some reason the client performs the INCR command but does not perform the EXPIRE the key will be leaked until we\'ll see the same IP address again.
This can be fixed easily turning the INCR with optional EXPIRE into a Lua script that is send using the EVAL command (only available since&
int64_t increment = 2016;
uint32_t expired_seconds = 100;
rc.incrby(key, increment , increment , expired_seconds);
Aquester2016-09-12 12:35:55
http://redis.io/commands/incr
If for some reason the client performs the INCR command but does not perform the EXPIRE the key will be leaked until we\'ll see the same IP address again.
This can be fixed easily turning the INCR with optional EXPIRE into a Lua script that is send using the EVAL command (only available since&