cachetools-async
Provides decorators that are inspired by and work closely with cachetools' for caching asyncio functions and methods.
Decision gist · record as of 2026-08-14
Yes. Low install friction, active maintenance, no known vulnerabilities, and MIT licensing make it a straightforward choice. Install it if you need memoization for asyncio functions and want to reuse cachetools' familiar cache strategies. The single cachetools dependency is lightweight and widely used.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later.
- Low friction: pure Python wheel with a single runtime dependency on cachetools.
- Actively maintained with recent releases; repository is not archived and receives commits.
License · maintenance · safety
MIT (permissive) — MIT license is permissive and imposes no significant restrictions on use, modification, or distribution in most contexts.
last release 2025-06-09 (431 days) · last repo commit 2026-04-01 · 18 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 512,688 downloads/mo, #6,255 on PyPI
Alternatives
Verify before relying
pip install cachetools_async
from cachetools import LRUCache
from cachetools_async import cached
@cached(cache=LRUCache(maxsize=32))
async def fetch_data(key):
# async work here
return result
await fetch_data(key)- Whether concurrent calls to the same cached async function with different arguments are deduplicated or only identical calls are coalesced.
- Performance characteristics and memory overhead compared to direct cachetools usage in async contexts.
- Thread-safety guarantees when the same cached function is called from multiple asyncio tasks or event loops.
What it is and what it does
cachetools_async adds memoization decorators for asyncio coroutine functions, building on top of cachetools' cache implementations. It lets you decorate async functions with @cached to automatically store and reuse their results, using the same cache strategies (LRU, TTL, etc.) that cachetools provides for synchronous code. The cache itself is not asynchronous—it's a regular mutable mapping—but the decorator handles the async execution model correctly.
A key behavior: if multiple concurrent calls arrive for the same cached key before the first one completes, they all wait for that single result rather than each triggering a separate computation. This deduplication happens transparently, making it useful for scenarios like parallel requests for the same resource.
Use it for
- Cache results from async HTTP requests (e.g., weather data, API responses) with TTL to avoid redundant network calls.
- Deduplicate concurrent async function calls in parallel workloads where multiple tasks request the same expensive computation.
- Implement LRU caching for async database queries or I/O operations to limit memory and improve response times.
- Add memoization to async data-fetching functions in web frameworks or async services without rewriting cache logic.
- Combine with cachetools' cache strategies to apply size limits and eviction policies to async coroutine results.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Low install friction, active maintenance, no known vulnerabilities, and MIT licensing make it a straightforward choice. Install it if you need memoization for asyncio functions and want to reuse cachetools' familiar cache strategies. The single cachetools dependency is lightweight and widely used.
Install
cachetools-async on PyPI
Before you install
Low friction: pure Python wheel with a single runtime dependency on cachetools. Actively maintained with recent releases; repository is not archived and receives commits.
Requires Python 3.9 or later.
License in practice
MIT license is permissive and imposes no significant restrictions on use, modification, or distribution in most contexts.
Quickstart
pip install cachetools_async
from cachetools import LRUCache
from cachetools_async import cached
@cached(cache=LRUCache(maxsize=32))
async def fetch_data(key):
# async work here
return result
await fetch_data(key)
Verify before relying
- Whether concurrent calls to the same cached async function with different arguments are deduplicated or only identical calls are coalesced.
- Performance characteristics and memory overhead compared to direct cachetools usage in async contexts.
- Thread-safety guarantees when the same cached function is called from multiple asyncio tasks or event loops.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagecachetools |
| Maintenance | Actively maintained 431 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 512,688 / month, #6,255 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: cachetools_async-0.0.5-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “asyncio memoization decorator”
- cachetools-asyncProvides async-aware memoization decorators for Python asyncio…
- py-memoizeCaching library for async Python applications that prevents cache…
- asyncacheProvides decorator-based caching for async functions using cachetools…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also asyncache · py-memoize · cachetools · onecache · cachettl · shelved-cache · memoization · async-lru · methodtools · django-cache-memoize