无服务器 Redis 缓存与限流
原名:upstash-redis
在边缘和无服务器应用中,通过 HTTP 使用 Redis 缓存、会话与限流。
中文 Skills 技能说明
适合无法保持长期 TCP 连接、但需要 TTL 缓存或 429 限流的应用。围绕 Upstash Redis SDK 设计缓存失效、会话保存与窗口策略,并通过真实请求验证结果。需要自有 Upstash 数据库和访问令牌,费用及区域可用性需确认;凭据只放在服务端受控环境。此技能不覆盖自建 Redis 集群管理,用户数据外发前需完成授权。原技能作者为 Upstash。
上游能力依据
上游原始适用说明:Use Redis over HTTP from serverless and edge runtimes with @upstash/redis, and add rate limiting with @upstash/ratelimit. Use when the user mentions Upstash Redis, needs Redis from a Next.js route handler or middleware, Vercel, Cloudflare Workers, Deno, or Bun without TCP connection pooling, or wants cache-aside with TTLs, a session store, counters, or a 429 rate limiter using fixed window, sliding window, or token bucket. DO NOT use for self-hosted or TCP Redis clients (ioredis, node-redis), Redis Cluster administration, or vector similarity search.
上游 SKILL.md 主要章节(保留原文标题):
- Requirements and limitations
- Step 1 — Install and create one client per module
- Step 2 — Cache-aside with TTL
- Step 3 — Sessions with sliding expiration
- Step 4 — Rate limiting a route handler
- Common pitfalls
- When NOT to use this skill
- References
使用边界
先确认数据口径、只读或写入权限以及备份方案。查询结果需要说明范围,任何结构或数据变更都应先预览并人工确认。
作者、翻译与许可证
- 原作者
- GitHub, Inc. 与 awesome-copilot contributors
- 中文翻译
- CEOFans翻译
- 许可证
- MIT
- 上游来源
- https://github.com/github/awesome-copilot/tree/a19b3101cc797a35de8b1c1698c13d1344703522/skills/upstash-redis
适用范围
平台:linux、macos、windows;标签:数据与数据库、无服务器 Redis 缓存与限流、开源技能
安全提示
基础静态扫描不等于绝对安全。技能可能调用命令、浏览器、云服务或本地文件,请在最小权限环境中使用,高风险操作必须人工确认。
如发现侵权、许可证或安全问题,可在本页前台提交投诉,管理员复核后可立即下架。