omni-cache
它能做什么
这项技能展示如何查看和控制 OmniRoute 的响应缓存。适合想复用之前的模型回答,或清除过时回答的管理员。
适用场景
- ✓当用户想查看响应缓存的运行效果的时候。
- ✓当用户想清除缓存的响应的时候。
- ✓当用户想设置缓存回答的保存时长,或设置问题需要多相似才能复用缓存的时候。
技能链接
https://github.com/cheaper-inference/OmniRoute/blob/release/v3.8.53/skills/omni-cache/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“响应缓存的效果怎么样?你能清除旧的条目吗?”
每周 5 个新技能,1 分钟读完。
工作原理
这项技能列出读取缓存统计、清除条目或统计数据,以及查看缓存条目的调用。它还涵盖生存时间(TTL)策略和语义相似度设置。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Overview
Manage the LLM response cache. View cache statistics, clear entries, configure TTL policies, and control semantic-similarity caching thresholds.
Authentication
All requests require a valid Bearer token or session cookie. Obtain a token via POST /api/auth/login or configure REQUIRE_API_KEY=false for local development.
Endpoints
GET /api/cache
Get cache statistics
curl http://localhost:20128/api/cache \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
DELETE /api/cache
Clear all caches
curl -X DELETE http://localhost:20128/api/cache \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
GET /api/cache/stats
Get detailed cache statistics
Returns detailed statistics for all cache layers.
curl http://localhost:20128/api/cache/stats \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
DELETE /api/cache/stats
Clear cache statistics
curl -X DELETE http://localhost:20128/api/cache/stats \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
GET /api/cache/entries
GET cache › entries
curl http://localhost:20128/api/cache/entries \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
DELETE /api/cache/entries
DELETE cache › entries
curl -X DELETE http://localhost:20128/api/cache/entries \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
GET /api/cache/reasoning
GET cache › reasoning
curl http://localhost:20128/api/cache/reasoning \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
DELETE /api/cache/reasoning
DELETE cache › reasoning
curl -X DELETE http://localhost:20128/api/cache/reasoning \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
Payloads
See the full OpenAPI specification at GET /api/openapi/spec or docs/openapi.yaml for detailed request/response schemas.
常见问题
清除缓存会做什么?
它会删除已存储的条目,因此新的请求会再次发送给模型。
什么是语义缓存?
这项技能把它描述为匹配相似问题的缓存,并由相似度阈值控制。
我能看到详细的统计数据吗?
可以。详细统计调用会返回所有缓存层的数据。
详情
作者的原始描述
Manage the LLM response cache. View cache statistics, clear entries, configure TTL policies, and control semantic-similarity caching thresholds.
热度
- GitHub 星标
- 84k
- 排名
- #1422
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …