Py学习  »  Redis

如何使用nodejs实现redis缓存中hashset的分页

mob jeny • 4 年前 • 627 次点击  

我在散列集中有大约1000条记录,我希望第一次只得到0-50条记录,然后再得到50-100条,依此类推。

我在用node redis。我想知道redis是否支持散列分页。

我试过zrange但没用

cacheClient.zrange('searchkeycounts', 0, 50, function (err, reply) {
                console.log(err);
                console.log(reply);
                                })

结果是:

{"result":"success","err":{"command":"ZRANGE","args":["searchkeycounts",0,5],"code":"WRONGTYPE"}} 

数据如下: hash data format

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/50348
 
627 次点击