Redis
数据库
通过自然对话检查键、分析内存并管理 Redis 实例——Neotask 运行于 OpenClaw。
- 无需记忆 Redis CLI 命令即可探索键空间、检查值并查询 TTL
- 按键模式、数据类型和逐出策略分析内存使用情况以发现浪费并优化成本
- 用简单英语解读延迟、命中率和复制延迟指标来监控 Redis 健康状况
你能做什么
检查键和值
要求 Neotask 查找与模式匹配的键,检查特定键的值和 TTL,或者计算给定键空间中存在多少个键。它运行正确的 Redis 命令(SCAN、TTL、TYPE、GET)并以可读格式返回结果,而无需原始 CLI 输出。
分析内存使用情况
要求按键前缀或数据类型细分内存使用情况。 Neotask 运行内存使用示例,使用对象编码分析键空间,并识别哪些模式消耗最多空间 - 对于优化大型缓存非常有用。
监控缓存性能
获取实时运行状况快照:键空间统计数据的缓存命中率、连接的客户端、每秒命令以及是否记录任何慢速命令。 Neotask 解释 INFO ALL 输出并突出显示需要注意的内容。
管理到期和驱逐
询问哪些键没有 TTL 设置(潜在的内存泄漏),更新与模式匹配的一组键的 TTL,或者检查当前的逐出策略以及它是否与您的用例匹配。
调试 Pub/Sub 和 Streams
检查活动的发布/订阅通道和订阅者计数,列出 Redis 流上的消费者组,并检查待处理消息计数 - 对于调试使用 Redis 作为消息代理的事件驱动架构非常有用。
尝试询问
“会话:键前缀使用了多少内存?”
“查找与 user:*:cart 匹配的所有密钥并显示其 TTL”
“此 Redis 实例当前的缓存命中率是多少?”
“哪些密钥没有设置过期时间?”
“按内存使用情况显示前 10 个最大的键”
“我的 Redis 副本的复制延迟是多少?”
“列出事件流上的所有消费者组及其待处理计数”
“为所有匹配 temp:* 且当前没有过期的密钥设置 1 小时 TTL”专业提示
始终在提示中使用基于 SCAN 的模式而不是 KEYS — Neotask 默认情况下将使用 SCAN,因此它不会阻止生产 Redis 实例。
要求对大键进行对象编码:存储为 ziplist 的哈希没问题,但存储为哈希表的哈希可能会产生意外的内存开销。
将内存分析与逐出策略配对:如果您使用 allkeys-lru,请询问 Neotask 哪些键最近未被访问并且可以被允许逐出。
使用 Neotask 设置快速监控基线:“每 5 分钟告诉我这五个统计数据”创建一个简单的可观察性循环,而无需完整的监控堆栈。
对于 Redis 集群部署,指定要检查的分片或请求集群范围的摘要 — Neotask 透明地处理基于槽的路由。
Works Well With
- 21st-dev - Connect 21st.dev and Redis with Neotask to automate UI workflows, cache component data, and accelerate your frontend dev...
- blogwatcher - Connect Redis and Blog Watcher with Neotask to cache feed data, trigger real-time pub/sub events on new posts, and autom...
- google-business-profile - Connect Google Business Profile and Redis with Neotask to automate review caching, sync business data, and speed up loca...
- himalaya - Connect Redis and Himalaya to automate podcast caching, optimize streaming data, and build faster audio content workflow...
- microsoftlearn - Automate Redis training workflows with Microsoft Learn. Sync azure redis cache learning, track progress, and accelerate ...
- obsidian - Connect Obsidian and Redis to build a high-speed knowledge base caching pipeline. Automate note syncing and accelerate d...
- philips-hue - Connect Philips Hue and Redis with Neotask to automate smart lighting based on real-time data events, cache states, and ...
- puppeteer - Combine Puppeteer browser automation with Redis caching to build faster, smarter scrapers and pipelines with Neotask.
- replicate - Connect Redis and Replicate with Neotask to cache AI predictions, reduce latency, and scale ML model inference without r...
- synapseorg - Connect Redis and Synapse with Neotask to cache biomedical datasets, accelerate research data retrieval, and automate pr...
- youtube - Connect Redis and YouTube with Neotask. Cache video metadata, automate YouTube API workflows, and build fast streaming c...