有没有在Redis中实现这个的方法?
任何帮助都将不胜感激。非常感谢! Bernie
SET counter 0
INCR counter
SET KEY:{counter} "Content of line 1"
INCR counter
SET KEY:{counter} "Different content of line 2"
我的示例代码应该被替换(即在运行时由redis-cli转换)为:
SET counter 0
INCR counter
SET KEY:1 "Content of line 1"
INCR counter
SET KEY:2 "Different content of line 2"
etc.
我的问题不是如何自动递增计数器。
我的问题是语法:如何将一个通用的{通配符}包含到类似于:
SET keyname:{currentcounter} "value" ...
任何帮助都将不胜感激。非常感谢! Bernie