开发者

is there any thing like get_next in redis?

Is there any support in redis to walk keys ? some thing like get_next api ? I did some search but couldnt find any thing relevant. my requirement is to get a key from a value so i iterate over all the keys and try开发者_C百科 to match the value with that of the required.


AFAIK, there's no get_next type of api/command in Redis. You can do some trick with the key though. Something like 1:id:<key_name>, 2:id:<key_name>, ..., n:id:<key_name>. You can use INCR to have an incremental counter. Also consider looking at keys to find a bunch of keys with a particular pattern.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜