Redis Array Playground:Redis 新增数组数据类型工具Redis Array Playground
Simon Willison 介绍了一个名为 Redis Array Playground 的新工具,用于测试 Redis 即将推出的数组数据类型。该数据类型由 Salvatore Sanfilippo(antirez)提交 PR 添加,支持 ARCOUNT、ARDEL、ARGET 等命令,允许在 Redis 中高效处理有序整数序列。此功能旨在提升 Redis 在数值索引场景下的性能表现,尤其适合需要频繁插入、删除和范围查询的应用。目前仍处于实验阶段,但已引起社区关注。
Simon Willison
Salvatore Sanfilippo submitted a PR adding a new data type - arrays - to Redis.
The new commands are ARCOUNT, ARDEL, ARDELRANGE, ARGET, ARGETRANGE, ARGREP, ARINFO, ARINSERT, ARLASTITEMS, ARLEN, ARMGET, ARMSET, ARNEXT, AROP, ARRING, ARSCAN, ARSEEK, ARSET.
The implementation is currently available in a branch, so I had Claude Code for web build this interactive playground for trying out the new commands in a WASM-compiled build of a subset of Redis running in the browser.
The most interesting new command is ARGREP which can run a server-side grep against a range of values in the array using the newly vendored TRE regex library.
Salvatore wrote more about the AI-assisted development process for the array type in Redis array type: short story of a long development.
需要完整排版与评论请前往来源站点阅读。