1- < div align = " center " >
1+ # YokedCache
22
3- # 🚀 YokedCache
4-
5- ** High-Performance Caching for Modern Python Applications**
3+ High-Performance Caching for Modern Python Applications
64
75[ ![ PyPI version] ( https://img.shields.io/pypi/v/yokedcache.svg )] ( https://pypi.org/project/yokedcache/ )
86[ ![ Python] ( https://img.shields.io/pypi/pyversions/yokedcache.svg )] ( https://pypi.org/project/yokedcache/ )
97[ ![ License] ( https://img.shields.io/badge/License-MIT-blue.svg )] ( https://opensource.org/licenses/MIT )
108[ ![ Tests] ( https://github.com/sirstig/yokedcache/actions/workflows/test.yml/badge.svg )] ( https://github.com/sirstig/yokedcache/actions/workflows/test.yml )
119[ ![ Code style: black] ( https://img.shields.io/badge/code%20style-black-000000.svg )] ( https://github.com/psf/black )
12- [ ![ PyPI - Downloads] ( https://img.shields.io/pypi/dm/yokedcache )] ( https://pypi.org/project/yokedcache/ )
10+ ![ PyPI - Downloads] ( https://img.shields.io/pypi/dm/yokedcache )
11+
12+ Intelligent caching with automatic invalidation, fuzzy search, and seamless FastAPI integration.
1313
14- * Intelligent caching with automatic invalidation, fuzzy search, and seamless FastAPI integration *
14+ ** [ Documentation ] ( https://sirstig.github.io/yokedcache ) ** | ** [ Report Bug ] ( https://github.com/sirstig/yokedcache/issues ) ** | ** [ Request Feature ] ( https://github.com/sirstig/yokedcache/issues ) * *
1515
16- [ 📚 Documentation ] ( https://sirstig.github.io/yokedcache ) • [ 🐛 Report Bug ] ( https://github.com/sirstig/yokedcache/issues ) • [ ✨ Request Feature ] ( https://github.com/sirstig/yokedcache/issues )
16+ ## Table of Contents
1717
18- </div >
18+ - [ Overview] ( #overview )
19+ - [ Key Features] ( #key-features )
20+ - [ Installation] ( #installation )
21+ - [ Quick Start] ( #quick-start )
22+ - [ Documentation] ( #documentation )
23+ - [ Usage Examples] ( #usage-examples )
24+ - [ CLI Usage] ( #cli-usage )
25+ - [ Performance] ( #performance )
26+ - [ Architecture] ( #architecture )
27+ - [ Testing] ( #testing )
28+ - [ Contributing] ( #contributing )
29+ - [ License] ( #license )
1930
2031---
2132
22- ## 🎯 ** Why YokedCache? **
33+ ## Overview
2334
24- Traditional caching solutions require manual cache management and lack intelligent invalidation. ** YokedCache** solves this with:
35+ Traditional caching solutions require manual cache management and lack intelligent invalidation. YokedCache solves this with:
2536
26- 🔄 ** Smart Auto-Invalidation** - Automatically detects database changes and invalidates related caches
27- ⚡ ** Zero-Code Integration** - Drop-in replacement for your existing database dependencies
28- 🎯 ** Intelligent Tagging** - Group and invalidate related caches effortlessly
29- 🔍 ** Fuzzy Search** - Find cached data with approximate matching
30- 📊 ** Performance Insights** - Built-in metrics and monitoring tools
37+ - ** Smart Auto-Invalidation** : Automatically detects database changes and invalidates related caches
38+ - ** Zero-Code Integration** : Drop-in replacement for your existing database dependencies
39+ - ** Intelligent Tagging** : Group and invalidate related caches effortlessly
40+ - ** Fuzzy Search** : Find cached data with approximate matching
41+ - ** Performance Insights** : Built-in metrics and monitoring tools
3142
32- ## ⚡ ** Quick Start**
43+ ## Quick Start
3344
3445``` bash
3546pip install yokedcache
@@ -50,72 +61,61 @@ async def get_user(user_id: int, db=Depends(cached_get_db)):
5061 return db.query(User).filter(User.id == user_id).first()
5162```
5263
53- ** That's it!** Your database queries are now cached with automatic invalidation. 🎉
64+ That's it! Your database queries are now cached with automatic invalidation.
5465
55- ## ✨ ** Features**
66+ ## Key Features
5667
57- <table >
58- <tr >
59- <td width =" 50% " >
68+ ### Smart Invalidation
6069
61- ### 🔄 ** Smart Invalidation**
6270- Automatic cache invalidation on database writes
6371- Tag-based grouping for related data
6472- Pattern-based invalidation with wildcards
6573- Configurable rules per table/operation
6674
67- ### 🎯 ** Deep Integration**
75+ ### Deep Integration
76+
6877- Zero-code FastAPI integration
6978- SQLAlchemy ORM support
7079- Async/await throughout
7180- Connection pooling & health checks
7281
73- </td >
74- <td width =" 50% " >
82+ ### Advanced Features
7583
76- ### 🔍 ** Advanced Features**
7784- Fuzzy search for approximate matches
7885- Multiple serialization methods
7986- Performance metrics & monitoring
8087- Variable TTLs with jitter
8188
82- ### 🖥️ ** Management Tools**
89+ ### Management Tools
90+
8391- Comprehensive CLI for cache control
8492- Real-time statistics and monitoring
8593- YAML-based configuration
8694- Cache warming capabilities
8795
88- </td >
89- </tr >
90- </table >
91-
92- ## 📦 ** Installation**
96+ ## Installation
9397
9498``` bash
95- # 🚀 Basic installation
99+ # Basic installation
96100pip install yokedcache
97101
98- # 🔧 With optional features
102+ # With optional features
99103pip install yokedcache[sqlalchemy,fuzzy] # Full-featured
100104
101- # 👨💻 Development
105+ # Development
102106pip install yokedcache[dev]
103107```
104108
105- ## 📖 ** Documentation**
106-
107- <div align =" center " >
108-
109- | 📚 ** Guide** | 🔗 ** Link** | 📝 ** Description** |
110- | -------------| ------------| -------------------|
111- | ** Quick Start** | [ Getting Started] ( #-quick-start ) | 5-minute integration guide |
112- | ** API Reference** | [ Docs] ( https://sirstig.github.io/yokedcache ) | Complete API documentation |
113- | ** Examples** | [ Examples] ( examples/ ) | Real-world usage examples |
114- | ** CLI Guide** | [ CLI Usage] ( #-cli-usage ) | Command-line tool documentation |
109+ ## Documentation
115110
116- </div >
111+ | Guide | Link | Description |
112+ | -------| ------| -------------|
113+ | Quick Start | [ Getting Started] ( #quick-start ) | 5-minute integration guide |
114+ | API Reference | [ Documentation] ( https://sirstig.github.io/yokedcache ) | Complete API documentation |
115+ | Examples | [ Examples] ( examples/ ) | Real-world usage examples |
116+ | CLI Guide | [ CLI Usage] ( #cli-usage ) | Command-line tool documentation |
117117
118- ## 🎬 ** Live Demo **
118+ ## Usage Examples
119119
120120``` python
121121from fastapi import FastAPI, Depends
@@ -124,18 +124,18 @@ from yokedcache import YokedCache, cached_dependency
124124app = FastAPI()
125125cache = YokedCache(redis_url = " redis://localhost:6379/0" )
126126
127- # 1️⃣ Wrap your existing database dependency
127+ # Wrap your existing database dependency
128128cached_get_db = cached_dependency(get_db, cache = cache, ttl = 300 )
129129
130130@app.get (" /users/{user_id} " )
131131async def get_user (user_id : int , db = Depends(cached_get_db)):
132- # 2️⃣ Your existing code works unchanged!
132+ # Your existing code works unchanged!
133133 return db.query(User).filter(User.id == user_id).first()
134134
135- # 🎉 Automatic caching + invalidation now active!
135+ # Automatic caching + invalidation now active!
136136```
137137
138- ## 🔧 ** Advanced Usage**
138+ ### Advanced Usage
139139
140140### Configuration with YAML
141141
@@ -169,7 +169,7 @@ data = await cache.get("key")
169169await cache.invalidate_tags(["products"])
170170```
171171
172- ## 🖥️ ** CLI Usage**
172+ ## CLI Usage
173173
174174YokedCache includes a powerful CLI for cache management:
175175
@@ -199,20 +199,16 @@ yokedcache export-config --output config.yaml
199199yokedcache warm --config-file cache_config.yaml
200200```
201201
202- ## 🚀 ** Performance**
202+ ## Performance
203203
204- <div align =" center " >
204+ | Metric | Improvement | Description |
205+ | --------| -------------| -------------|
206+ | Database Load | 60-90% reduction | Automatic query caching |
207+ | Response Time | 200-500ms faster | Redis-fast cache hits |
208+ | Memory Usage | Optimized | Efficient serialization |
209+ | Setup Time | Under 5 minutes | Drop-in integration |
205210
206- | ** Metric** | ** Improvement** | ** Description** |
207- | ------------| ----------------| -----------------|
208- | ** Database Load** | ↓ 60-90% | Automatic query caching |
209- | ** Response Time** | ↓ 200-500ms | Redis-fast cache hits |
210- | ** Memory Usage** | Optimized | Efficient serialization |
211- | ** Setup Time** | < 5 minutes | Drop-in integration |
212-
213- </div >
214-
215- ## 🏗️ ** Architecture**
211+ ## Architecture
216212
217213``` mermaid
218214graph TB
@@ -226,7 +222,7 @@ graph TB
226222 I --> J[Clear Related Cache]
227223```
228224
229- ## 🧪 ** Testing**
225+ ## Testing
230226
231227``` bash
232228# Install with dev dependencies
@@ -242,47 +238,39 @@ pytest --cov=yokedcache
242238pytest tests/test_cache.py::TestAutoInvalidation
243239```
244240
245- ## 🤝 ** Contributing**
241+ ## Contributing
246242
247243We welcome contributions! Here's how to get started:
248244
249- 1 . ** Fork** the repository
250- 2 . ** Create** a feature branch: ` git checkout -b feature/amazing-feature `
251- 3 . ** Make** your changes and add tests
252- 4 . ** Commit** your changes: ` git commit -m "feat: add amazing feature" `
253- 5 . ** Push** to the branch: ` git push origin feature/amazing-feature `
254- 6 . ** Open** a Pull Request
245+ 1 . Fork the repository
246+ 2 . Create a feature branch: ` git checkout -b feature/amazing-feature `
247+ 3 . Make your changes and add tests
248+ 4 . Commit your changes: ` git commit -m "feat: add amazing feature" `
249+ 5 . Push to the branch: ` git push origin feature/amazing-feature `
250+ 6 . Open a Pull Request
255251
256252See [ CONTRIBUTING.md] ( CONTRIBUTING.md ) for detailed guidelines.
257253
258- ## 📊 ** Project Status**
259-
260- <div align =" center " >
254+ ## Project Status
261255
262256[ ![ GitHub stars] ( https://img.shields.io/github/stars/sirstig/yokedcache?style=social )] ( https://github.com/sirstig/yokedcache/stargazers )
263257[ ![ GitHub forks] ( https://img.shields.io/github/forks/sirstig/yokedcache?style=social )] ( https://github.com/sirstig/yokedcache/network/members )
264258[ ![ GitHub issues] ( https://img.shields.io/github/issues/sirstig/yokedcache )] ( https://github.com/sirstig/yokedcache/issues )
265259[ ![ GitHub pull requests] ( https://img.shields.io/github/issues-pr/sirstig/yokedcache )] ( https://github.com/sirstig/yokedcache/pulls )
266260
267- </ div >
261+ ## License
268262
269- ## 📄 ** License**
263+ This project is licensed under the MIT License - see the [ LICENSE ] ( LICENSE ) file for details.
270264
271- This project is licensed under the ** MIT License ** - see the [ LICENSE ] ( LICENSE ) file for details.
265+ ## Acknowledgments
272266
273- ## 🙏 ** Acknowledgments**
274-
275- - ** Redis** - For the excellent caching backend
276- - ** FastAPI** - For the amazing Python web framework
277- - ** SQLAlchemy** - For database ORM integration
278- - ** Python Community** - For continuous inspiration and feedback
267+ - [ Redis] ( https://redis.io/ ) - For the excellent caching backend
268+ - [ FastAPI] ( https://fastapi.tiangolo.com/ ) - For the amazing Python web framework
269+ - [ SQLAlchemy] ( https://www.sqlalchemy.org/ ) - For database ORM integration
270+ - Python Community - For continuous inspiration and feedback
279271
280272---
281273
282- <div align =" center " >
283-
284- ** Made with ❤️ by [ Project Yoked LLC] ( https://github.com/sirstig ) **
285-
286- * If YokedCache helps your project, please consider giving it a ⭐ on GitHub!*
274+ ** Made with care by [ Project Yoked LLC] ( https://github.com/sirstig ) **
287275
288- </ div >
276+ If YokedCache helps your project, please consider giving it a star on GitHub!
0 commit comments