Metadata-Version: 2.3
Name: acachetools
Version: 0.1.0
Summary: Async cachetools decorators with stampede protection.
Author: RektPunk
Author-email: RektPunk <rektpunk@gmail.com>
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: cachetools>=7.1.4
Requires-Python: >=3.10
Project-URL: repository, https://github.com/RektPunk/acachetools
Description-Content-Type: text/markdown

<div style="text-align: center;">
  <img src="https://capsule-render.vercel.app/api?type=transparent&fontColor=0047AB&text=acachetools&height=120&fontSize=90">
</div>

**acachetools** provides asyncio-compatible versions of `cachetools.cached()` and `cachetools.cachedmethod()`. Concurrent calls for the same cache key share a single in-flight computation, preventing cache stampedes.

## Installation
```bash
pip install acachetools
```

## Usage
```python
from cachetools import TTLCache
from acachetools import cached

# Compatible with TTLCache, LRUCache, LFUCache, RRCache, etc.
@cached(cache=TTLCache(maxsize=1024, ttl=600))
async def foo(bar: int):
    ...
```
