An asyncio Cache
Project description
- info:
A caching solution for asyncio
Installation
pip install async-cache
Basic Usage
# LRU Cache
from cache import AsyncLRU
@AsyncLRU(maxsize=128)
async def func(*args, **kwargs):
pass
# TTL Cache
from cache import AsyncTTL
@AsyncTTL(time_to_live=60, min_cleanup_interval=60)
async def func(*args, **kwargs):
pass
Supports primitive as well as non-primitive function parameter.
Currently TTL & LRU cache is supported.
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
async-cache-1.0.1.tar.gz
(2.9 kB
view hashes)