asyncache
Helpers to use cachetools with async code.
What it is and what it does
asyncache bridges cachetools and asyncio by providing a @cached decorator that works with async functions. It lets you apply caching strategies—TTL, LRU, and others from cachetools—to the results of coroutines, so repeated calls with the same arguments return cached values instead of re-running the async work.
The package is a thin wrapper around cachetools, adding asyncio compatibility. It is straightforward to use but has been abandoned since late 2022, meaning no active maintenance, no response to issues, and no updates for future Python versions. It works with Python 3.8, 3.9, 3.10, and declares support for current versions, but real-world compatibility with newer releases is unverified.
Use it for:
- Cache results of database queries in async web applications to reduce repeated I/O.
- Memoize expensive async API calls with automatic expiration using TTL caching.
- Reduce load on external services by caching async HTTP responses with size or time limits.
- Speed up async data processing pipelines by avoiding redundant computations on repeated inputs.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides decorator-based caching for async functions using cachetools strategies like TTL and LRU, allowing you to cache the results of async operations with configurable eviction policies.
Yes, if your codebase is stable on Python 3.8–3.10 and you need simple async caching without active maintenance. The package is small, well-scoped, and has no known vulnerabilities. No, if you require ongoing support, compatibility with future Python versions, or expect to file bugs—the maintainer is not active. Consider it a stable utility for existing projects, not a foundation for new ones.
Install
asyncache on PyPI
pip
pip install asyncacheuv
uv add asyncachepoetry
poetry add asyncacheInstalling asyncache
Before you install
Low friction install with a single dependency on cachetools. However, the package is abandoned—last release was 1368 days ago with no recent maintenance activity, so it will not receive bug fixes or updates for newer Python versions beyond those already declared.
License in practice
MIT license is permissive and poses no restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
pip install asyncache
from asyncache import cached
from cachetools import TTLCache
@cached(TTLCache(1024, 60))
async def get_data(key):
# async operation here
return result
Requires Python 3.8 or later; the package is not actively maintained.
Verify before relying
- Whether the package remains compatible with Python versions released after 2022-11-15 despite declaring support for current versions.
- Whether asyncio semantics or cachetools API changes since last release affect real-world usage.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8,<4.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — cachetools |
| Maintenance | abandoned — 1,368 days since the last release |
| First released | |
| Downloads | 1,328,978/month — #4,049 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: asyncache-0.3.1-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
cachetools-asyncProvides async-aware memoization decorators for…
permissive · top 15,000 on PyPI
py-memoizeCaching library for async Python applications…
permissive · top 15,000 on PyPI
python-redis-cacheDecorator-based caching for Python functions…
permissive · top 15,000 on PyPI
cachetoolsProvides memoizing collections and function…
permissive · top 1,000 on PyPI
vercel-cacheProvides runtime cache helpers for Vercel…
permissive · top 5,000 on PyPI
memoizationDecorator-based function result caching with…
permissive · top 5,000 on PyPI
onecacheOneCache provides LRU-based caching decorators…
permissive · top 15,000 on PyPI
methodtoolsProvides LRU caching for methods, classmethods,…
permissive · top 5,000 on PyPI
cachettlcachettl provides LRU TTL cache decorators for…
permissive · top 15,000 on PyPI
async-lruAn LRU cache decorator for async functions that…
permissive · top 1,000 on PyPI