# zilliztech/GPTCache

Semantic cache for LLMs. Fully integrated with LangChain and llama_index.

Repository: https://github.com/zilliztech/GPTCache
Canonical: https://ross.abutalabs.com/products/gptcache
Homepage: https://gptcache.readthedocs.io
Language: Python
License: MIT
License Family: permissive
Topics: chatbot, chatgpt, chatgpt-api, llm, milvus, similarity-search, vector-search, aigc, openai, memcache, gpt, langchain, autogpt, redis, babyagi, llama-index, llama, dolly, semantic-search
Last push: 2025-07-11T09:04:36+00:00

## Health v2 (maintenance only)
Score: 35/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 31, release rhythm 8, longevity 89
- inputs: {"age_days": 1258, "days_push": 418, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 8172, forks 593 (observed 2026-08-28T04:10:14.033712+00:00)

## What it is
GPTCache is a Python library for building a semantic cache that stores and retrieves LLM responses based on embedding similarity, reducing API costs and latency. It integrates with LangChain and llama_index and offers a Docker server usable from any language.

## Use cases
- cache LLM API responses to cut costs
- speed up chatbot responses with semantic caching
- reduce duplicate OpenAI API calls
- add a memcache layer for AIGC applications
- integrate semantic caching into LangChain pipelines

## When to choose
- your LLM app has high traffic with repeated or similar queries
- you want to lower OpenAI/LLM API bills and latency
- you use LangChain or llama_index and want drop-in caching

## When to avoid
- you need support for brand-new LLM APIs (no longer added)
- you need a stable, unchanging API (it may change)
- your queries are mostly unique with little semantic overlap

## Facets
- artifact type: library
- maturity: maintenance
- function: caching, llm-inference, rag, search-engine
- domain: large-language-models, artificial-intelligence, chatbots, databases
- platform: python, self-hosted
- tags: semantic-cache, llm-cost-reduction, vector-search, langchain, llama-index, openai, milvus, redis, docker

## Member repositories
- zilliztech/GPTCache (main) score 35

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:14.033712+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:29:35.422265+00:00, confidence not recorded.
  - readme: https://github.com/zilliztech/GPTCache (fetched 2026-08-28T04:10:14.033712+00:00, sha 4922c5959e3d)
  - homepage: https://gptcache.readthedocs.io (fetched 2026-08-29T08:28:25.349401+00:00, sha 3b0ab85fe282)
  - registry_pypi: https://pypi.org/pypi/gptcache/json (fetched 2026-08-29T08:28:25.358948+00:00, sha ff6496245ea8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
