Store LLM responses for AI applications in Redis Cloud.
Redis Cloud |
---|
LangCache on Redis Cloud is currently available as a public preview. Features and behavior are subject to change.
LangCache is a semantic caching service available as a REST API that stores LLM responses for fast and cheaper retrieval, built on the Redis vector database. By using semantic caching, you can significantly reduce API costs and lower the average latency of your generative AI applications.
For more information about how LangCache works, see the LangCache overview.
LangCache reduces your LLM costs by caching responses and avoiding repeated API calls. When a response is served from cache, you don’t pay for output tokens. Input token costs are typically offset by embedding and storage costs.
For every cached response, you'll save the output token cost. To calculate your monthly savings with LangCache, you can use the following formula:
Est. monthly savings with LangCache =
(Monthly output token costs) ×ばつ (Cache hit rate)
The more requests you serve from LangCache, the more you save, because you’re not paying to regenerate the output.
Here’s an example:
You can also use the LangCache savings calculator to estimate your annual savings with LangCache.
To set up LangCache on Redis Cloud:
After you set up LangCache, you can view and edit the cache and monitor the cache's performance.