From openrouter-pack
Implement response caching to reduce costs and latency. Use when dealing with repeated queries or high-volume scenarios. Trigger with phrases like 'openrouter cache', 'cache responses', 'openrouter caching', 'reduce api calls'.
How this skill is triggered — by the user, by Claude, or both
Slash command
/openrouter-pack:openrouter-caching-strategyThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill shows how to implement caching layers for OpenRouter responses to reduce costs, lower latency, and handle repeated queries efficiently.
This skill shows how to implement caching layers for OpenRouter responses to reduce costs, lower latency, and handle repeated queries efficiently.
temperature: 0)| Error | Cause | Fix |
|---|---|---|
| Stale cached responses | TTL too long for dynamic content | Reduce TTL or add cache invalidation triggers |
| Cache key collisions | Hash function not including all relevant parameters | Include model, messages, temperature, max_tokens, and tools in the key |
| Memory pressure | In-memory cache growing unbounded | Set max cache size with LRU eviction; use Redis for large caches |
See ${CLAUDE_SKILL_DIR}/references/errors.md for full error reference.
See ${CLAUDE_SKILL_DIR}/references/examples.md for runnable code samples.
npx claudepluginhub nickloveinvesting/nick-love-plugins --plugin openrouter-packImplements in-memory and Redis caching for OpenRouter LLM API responses on deterministic requests to reduce costs and latency. Use for repeat queries or RAG systems.
Caches LLM prompts and responses using Anthropic prompt caching, Redis response caching, and Cache Augmented Generation (CAG).
Implements LLM prompt caching with Anthropic's native API, Redis-based response caching via hashing, and CAG patterns. Optimizes costs and latency for repeated prefixes or queries.