zilliztech/GPTCache

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

View on GitHub ↗Jump to charts ↓Open shareable report →

Data as of . Signed-in members get hourly updates — create a free account.

Summary Information

Updated 2 hours ago
Added to GitGenius on September 22nd, 2026
Created on March 24th, 2023
Open Issues & Pull Requests: 101 (+0)
GitHub issues: Enabled
Number of forks: 597
Total Stargazers: 8,202 (+1)
Total Subscribers: 59 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 11.1 hours
Mean response time: 26.7 days
90th percentile: 48.8 days
Tracked items: 20

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 18
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 583 days
Stale 30+ days: 15
Stale 90+ days: 13

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • planned (1)

Most active issues this week

Sign in to see which issues are moving.
Sign in

Detailed Description

GPTCache is a semantic cache library for large language models that reduces API costs and latency by storing and retrieving cached responses based on semantic similarity rather than exact matching.

The tool addresses the problem of escalating LLM API expenses and slow response times as applications scale. It works by intercepting LLM queries, computing semantic embeddings, and checking whether similar questions have been answered before. If a semantically similar cached response exists, it returns that instead of making a new API call. The library supports both exact matching and similarity-based matching strategies, allowing developers to choose the caching behavior that fits their use case.

The project integrates directly with LangChain and llama_index, making it straightforward to add caching to existing applications built on these frameworks. A Docker image is available, enabling usage from any programming language, not just Python. The tool suits applications that make repeated or similar queries to LLMs and want to reduce costs without architectural changes. Developers should be aware that the API remains unstable as the project is under active development, and the maintainers have stopped adding support for new model APIs, instead encouraging use of the generic get and set API for flexibility as the LLM landscape evolves.

The project shows signs of rapid iteration with frequent updates to core functionality. The README explicitly warns that the API may change at any time and directs users to documentation and release notes for current information. The codebase includes automatic installation of optional dependencies as features are used, reducing initial setup friction. The project maintains example code and bootcamp materials to help users understand both basic and advanced caching patterns.