跳到正文
Skillpedia
API 与服务器(后端)84k · #1422

omni-cache

它能做什么

这项技能展示如何查看和控制 OmniRoute 的响应缓存。适合想复用之前的模型回答,或清除过时回答的管理员。

适用场景

  • ✓当用户想查看响应缓存的运行效果的时候。
  • ✓当用户想清除缓存的响应的时候。
  • ✓当用户想设置缓存回答的保存时长,或设置问题需要多相似才能复用缓存的时候。

技能链接

https://github.com/cheaper-inference/OmniRoute/blob/release/v3.8.53/skills/omni-cache/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/cheaper-inference/OmniRoute/blob/release/v3.8.53/skills/omni-cache/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“响应缓存的效果怎么样?你能清除旧的条目吗?”

每周 5 个新技能,1 分钟读完。

工作原理

这项技能列出读取缓存统计、清除条目或统计数据,以及查看缓存条目的调用。它还涵盖生存时间(TTL)策略和语义相似度设置。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

<!-- generated by src/lib/agentSkills/generator.ts; manual edits will be overwritten -->

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.

repo: cheaper-inference/OmniRoute

热度

GitHub 星标
84k
排名
#1422
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能