Skip to content

2. Redis API的理解和使用 | 杂记 #20

@caticat

Description

@caticat

https://caticat.github.io/2018/04/04/redis-basic-2/

全局命令 查看所有的键,o(n),线上应禁止使用keys * 查看键总数,o(1)dbsize 检查键是否存在exists $key 删除键del $key... 键过期,设置键的过期秒数,RedisLV不支持expire $key $seconds查询key的剩余有效时间,ttl $key >0,剩余有效时间秒 -1,无过期时间 -2,键不存在 键的数据结构类型type $key

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions