Semantic caching framework for LLMs
Project description
CacheMind is a lightweight semantic caching layer for LLM applications.
It helps reduce redundant LLM calls to improve response time and save LLM token costs.
📦Installation pip install cachemind
⚡Quick Start from cachemind import CacheMind cache = CacheMind()
response = cache.query("What is artificial intelligence?") print(response)
🧩Customization CacheMind is designed to be flexible. You can plug in your own components for LLM, embedding, vector store, and policy.
Custom Embedding class MyEmbedding: def encode(self, text): return [0.1] * 384 cache = CacheMind(embedding=MyEmbedding())
📊 Metrics CacheMind also supports metrics tracking, allowing you to monitor cache performance and effectiveness over time.
stats = cache.metrics.get_stats() print(stats)
Example output: { "total_queries": 10, "cache_hits": 6, "cache_misses": 4, "hit_rate": 0.6, "tokens_saved": 120, "tokens_used": 80 }
License: MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cachemind-0.1.0.tar.gz.
File metadata
- Download URL: cachemind-0.1.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40555d920618efb0500f979d861da8ad31102a016b3dc502290d3f5b33e2f27d
|
|
| MD5 |
88761b9cd53a14d784e6c4e7d2ad2fb6
|
|
| BLAKE2b-256 |
a94779a5beb48323f08fbb7bc37002a368289225b586d03441358c0412b60f08
|
File details
Details for the file cachemind-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cachemind-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
665480ecb1f8e349ef94edd80d1f1eb14d8eac6e47268dbaf2cd4a25d05c9be4
|
|
| MD5 |
c78dfd63f54cf332d440720fcd7ffbe6
|
|
| BLAKE2b-256 |
fb401c7b6baeafba1fd96ce62da9fab0d015e40f6545de278e3c72393ec84e1e
|