Home >Backend Development >PHP Tutorial >redis集群下分页获取key,获取所有key的数量

redis集群下分页获取key,获取所有key的数量

WBOY
WBOYOriginal
2016-06-06 20:31:394221browse

redis集群下如何

1,获取集群的所有key的总数,类似mysql的表的所有记录总数;

2,像mysql那样分页获取 ($offset, $limit)一部分数据;

3,获取key的数据类型,是string,hash等;

回复内容:

redis集群下如何

1,获取集群的所有key的总数,类似mysql的表的所有记录总数;

2,像mysql那样分页获取 ($offset, $limit)一部分数据;

3,获取key的数据类型,是string,hash等;

  1. KEYS * 获取所有的key ,然后你自己统计数量咯
  2. redis是缓存数据库,没必要分页吧,也没那功能。
  3. type your-key
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn