content/develop/ai/langcache/_index.md
Redis LangCache is a fully-managed semantic caching service that reduces large language model (LLM) costs and improves response times for AI applications.
Get started with LangCache on [Redis Cloud]({{< relref "/operate/rc/langcache" >}}) or join the private preview.
LangCache uses semantic caching to store and reuse previous LLM responses for repeated queries. Instead of calling the LLM for every request, LangCache checks if a similar response has already been generated and is stored in the cache. If a match is found, LangCache returns the cached response instantly, saving time and resources.
Imagine you’re using an LLM to build an agent to answer questions about your company's products. Your users may ask questions like the following:
These prompts may have slight variations, but they essentially ask the same question. LangCache can help you avoid calling the LLM for each of these prompts by caching the response to the first prompt and returning it for any similar prompts.
Using LangCache as a semantic caching service has the following benefits:
LangCache works well for the following use cases:
{{< embed-md "langcache-cost-reduction.md" >}}
The following diagram displays how you can integrate LangCache into your GenAI app:
{{< image filename="images/rc/langcache-process.png" alt="The LangCache process diagram." >}}
POST /v1/caches/{cacheId}/entries/search endpoint.POST /v1/caches/{cacheId}/entries endpoint.See the [LangCache API and SDK examples]({{< relref "/develop/ai/langcache/api-examples" >}}) for more information on how to use the LangCache API.
LangCache is currently in preview:
{{< multitabs id="langcache-get-started" tab1="Redis Cloud" tab2="Private preview" >}}
{{< embed-md "rc-langcache-get-started.md" >}}
-tab-sep-
To use LangCache in private preview, you need:
LangCache is offered as a fully-managed service. During the private preview:
LangCache stores your data on your Redis servers. Redis does not access your data or use it to train AI models. The service maintains enterprise-grade security and privacy standards.
Private preview participants receive:
For more information about joining the private preview, visit the Redis LangCache website.
{{< /multitabs >}}