async-lru
Simple LRU cache for asyncio
Install
async-lru on PyPI
pip
pip install async-lruuv
uv add async-lrupoetry
poetry add async-lruPackage facts
| License | MIT License (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — typing_extensions |
| Maintenance | actively maintained — 147 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: async_lru-2.3.0-py3-none-any.whl
Keywords: asyncio, lru, lru_cache
About async-lru
from the package's own PyPI description — quoted content, verbatim
async-lru
:info: Simple lru cache for asyncio
.. image:: https://github.com/aio-libs/async-lru/actions/workflows/ci-cd.yml/badge.svg?event=push :target: https://github.com/aio-libs/async-lru/actions/workflows/ci-cd.yml?query=event:push :alt: GitHub Actions CI/CD workflows status
.. image:: https://img.shields.io/pypi/v/async-lru.svg?logo=Python&logoColor=white :target: https://pypi.org/project/async-lru :alt: async-lru @ PyPI
.. image:: https://codecov.io/gh/aio-libs/async-lru/branch/master/graph/badge.svg :target: https://codecov.io/gh/aio-libs/async-lru
.. image:: https://img.shields.io/matrix/aio-libs:matrix.org?label=Discuss%20on%20Matrix%20at%20%23aio-libs%3Amatrix.org&logo=matrix&server_fqdn=matrix.org&style=flat :target: https://matrix.to/#/%23aio-libs:matrix.org :alt: Matrix Room — #aio-libs:matrix.org
.. image:: https://img.shields.io/matrix/aio-libs-space:matrix.org?label=Discuss%20on%20Matrix%20at%20%23aio-libs-space%3Amatrix.org&logo=matrix&server_fqdn=matrix.org&style=flat :target: https://matrix.to/#/%23aio-libs-space:matrix.org :alt: Matrix Space — #aio-libs-space:matrix.org
Installation
.. code-block::...
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Provides an LRU cache decorator for async functions that deduplicates concurrent calls and supports TTL expiration with jitter, mirroring Python's functools.lru_cache for asyncio.
Minimal friction: pure-Python wheel with only typing_extensions as a runtime dependency. Active maintenance with recent releases (147 days since last) and 951 GitHub stars signal a stable, well-maintained library.
MIT License (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.
Usage
pip install async-lru
from async_lru import alru_cache
@alru_cache(maxsize=32)
async def my_func(arg):
return arg * 2
await my_func(5) # Returns 10
print(my_func.cache_info()) # View hit/miss stats
Requires Python ≥3.10. Cache instances are bound to a single event loop; using the same decorated function across multiple event loops raises RuntimeError.
Verdict: Production-ready async caching library with low install friction, active maintenance, and no known vulnerabilities. The single-event-loop constraint is documented and manageable for typical asyncio applications. Recommended for projects needing efficient memoization of async functions with optional TTL support.
Needs verification
- Performance characteristics relative to alternatives or uncached baselines in real-world async workloads
- Whether the thundering herd mitigation (jitter) is effective in high-concurrency scenarios
Similar packages
permissive · top 1,000 on PyPI
multidictpermissive · top 100 on PyPI
pluggypermissive · top 100 on PyPI
cached-propertypermissive · top 1,000 on PyPI
async-timeoutpermissive · top 1,000 on PyPI
yarlpermissive · top 100 on PyPI
aiohttppermissive · top 100 on PyPI
frozenlistpermissive · top 100 on PyPI
pytest-asynciopermissive · top 1,000 on PyPI
propcachepermissive · top 100 on PyPI