Redis PFSELFTEST 命令
发表于|更新于|Redis教程
|浏览量:
语法
1 | PFSELFTEST |
可用版本
≥ 2.8.9
时间复杂度
N/A
ACL类别
@hyperloglog, @admin, @slow, @dangerous
PFSELFTEST 是一个内部命令,仅用于开发和测试 Redis。
(END)
文章作者: Johnson Lin
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Johnson Lin!
相关推荐
2024-10-20
Redis Bitmap BITCOUNT Command
The Redis BITCOUNT command count the number of set bits (population counting) in a string. SyntaxThe basic syntax of the BITCOUNT command is as follows: 1BITCOUNT key [start end [BYTE | BIT]] By default all the bytes contained in the string are examined. It is possible to specify the counting operation only in an interval passing the additional arguments start and end. Like for the GETRANGE command start and end can contain negative values in order to index bytes starting from the end of the ...

2024-07-30
Effective Ways to Delete Fuzzy Matching Keys in Redis
In Redis, managing keys efficiently is crucial for optimal performance. Sometimes, you might need to delete keys that match a pattern or have a fuzzy match. Here’s how you can achieve this: Using Redis CLI CommandsRedis CLI provides several commands to interact with keys. To delete keys that match a pattern, you can use the KEYS command in combination with the DEL command: 1redis-cli KEYS "pattern*" | xargs redis-cli DEL Replace "pattern*" with your specific pattern. This ...
2024-11-15
Introduction to Redis Bitmaps
Bitmaps are not an actual data type, but a set of bit-oriented operations defined on the String type which is treated like a bit vector. Since strings are binary safe blobs and their maximum length is 512 MB, they are suitable to set up to 2^32 different bits. You can perform bitwise operations on one or more strings. Some examples of bitmap use cases include: Efficient set representations for cases where the members of a set correspond to the integers 0-N. Object permissions, where each bit...
2023-06-02
Redis GETEX 命令
语法12GETEX key [EX seconds | PX milliseconds | EXAT unix-time-seconds | PXAT unix-time-milliseconds | PERSIST] 可用版本 ≥ 6.2.0 时间复杂度 $O(1)$ ACL 类别 @write, @string, @fast 获取 key 的值,并可以选择设置其过期时间。GETEX 与 GET 类似,但它是一个带有额外选项的写命令。 选项GETEX 命令支持以下选项来修改它的行为: EX seconds — 设置指定的过期时间,单位是秒。 PX milliseconds — 设置指定的过期时间,单位是毫秒。 EXAT timestamp-seconds — 设置指定的 Unix 时间,key 将在该时间过期,单位是秒。 PXAT timestamp-milliseconds — 设置指定的 Unix 时间,key 将在该时间过期,单位是毫秒。 PERSIST — 删除 key 的过期时间,即 key 永不过期。 返回值返回 key 的值,如果 key 不存在,则返回 nil...
2023-06-04
Redis SETEX 命令
从 Redis 2.6.12 版本开始,此命令被标记为已废弃。在迁移或编写新的代码时,可以使用带有 EX 参数的 SET 命令替代。 语法1SETEX key seconds value 可用版本 ≥ 2.0.0 时间复杂度 $O(1)$ ACL类别 @write, @string, @slow 设置 key 以保存字符串值,并将 key 设置为在给定的秒数后过期。此命令等效于: 1SET key value EX seconds 当秒数无效时,返回错误。 返回值如果正确执行,则返回 OK。 示例123456redis> SETEX tt_key 1000 "JOHNSON"OKredis> TTL tt_key(integer) 1000redis> GET tt_key"JOHNSON" (END)
2023-06-02
从源代码编译和安装 Redis
我们可以在主流操作系统(包括 Windows、Linux 和 macOS)上从源代码编译和安装 Redis。Redis 除了 C 编译器和 libc 之外没有其他依赖。 Redis可以在以下系统上编译和安装: Linux - 包括 Ubuntu,RedHat,Arch Linux 等发行版。 macOS 其他类 UNIX 系统 - 如 FreeBSD,OpenBSD。 Windows - 需要安装 MinGW 并编译 Windows 版本的 Redis。 要从源代码编译 Redis,需要: 安装 git 并克隆 Redis 最新版本的源代码: 1git clone https://github.com/redis/redis.git Redis 的源文件也可以从官方下载页 [https://redis.io/download] 直接下载获得。可以通过对照 redis-hashes git 仓库中的摘要来验证这些下载文件的完整性。 要从 Redis 下载站点获取最新稳定版 Redis 的源文件,请运行: 1wget https://download.redis.io/red...


