# redis-semantic-cache

> Claude/Codex skill by [@redis](https://omgskills.com/library/redis/index.md) · 169 stars · Updated 2026-09-08

Redis LangCache guidance for semantic caching of LLM responses on Redis Cloud — calling search/set via the SDK or REST API, tuning the similarity threshold, separating caches per task type, and filtering with custom attributes. Use when caching LLM completions or RAG answers to cut API cost and latency, building a cache-aside layer in front of OpenAI / Anthropic / etc., tuning hit rate vs precision, or splitting one app's LLM workloads into multiple LangCache caches.

Tags: agent-skills, redis

## Install

```sh
git clone https://github.com/redis/agent-skills /tmp/agent-skills && ln -s /tmp/agent-skills/skills/redis-semantic-cache ~/.claude/skills/redis-semantic-cache
```

## From README

Redis Semantic Cache Semantic caching for LLM responses with Redis Cloud's LangCache service. Stores prompts as embeddings; subsequent semantically-similar prompts return the cached response without re-calling the model. LangCache is currently in preview on Redis Cloud. Features and behavior may change. When to apply Wrapping an LLM call (OpenAI, Anthropic, etc.) with a cache layer to cut cost and latency. Caching RAG answers, classification outputs, or any deterministic LLM workload. Tuning the precision/hit-rate trade-off for a semantic cache. Splitting one application's LLM workloads across multiple cache instances. The cache-aside flow LangCache fits in front of any LLM call as a standard cache-aside pattern: Send the user's prompt to LangCache's search. Cache hit — return the stored response directly. Cache miss — call the LLM, then set the response so future similar prompts hit.

## Links

- HTML page: https://omgskills.com/library/redis/agent-skills/skills/redis-semantic-cache/
- GitHub: https://github.com/redis/agent-skills
- Author: [@redis](https://omgskills.com/library/redis/index.md)

## More from this repo

- [iris-development](https://omgskills.com/library/redis/agent-skills/skills/iris-development/index.md) — Iris is Redis's umbrella for AI-focused products.
   - [@redis](https://omgskills.com/library/redis/index.md) · 169 stars
- [redis-clustering](https://omgskills.com/library/redis/agent-skills/skills/redis-clustering/index.md) — Redis Cluster and replication guidance covering hash tags for multi-key operations, avoiding CROSSSLOT errors, and...
   - [@redis](https://omgskills.com/library/redis/index.md) · 169 stars
- [redis-connections](https://omgskills.com/library/redis/agent-skills/skills/redis-connections/index.md) — Redis client and connection guidance covering connection pooling, multiplexing, pipelining, client-side caching with...
   - [@redis](https://omgskills.com/library/redis/index.md) · 169 stars
