--- id: aiocache version: "0.12.3" license: unclear license_treatment: unclear maintenance: active --- # aiocache — multi backend asyncio cache License: unclear · Maintenance: active · Downloads: 8.8M/mo ## What it is and what it does aiocache is an asyncio caching library that abstracts over multiple backend storage systems—in-memory, Redis, and memcached—behind a single, consistent API. It lets you cache the results of async functions and manage key-value data without rewriting code when you switch backends. The library includes decorators for transparent caching, serializers to handle Python objects, and a plugin system for hooks like timing and hit-miss tracking. You can use it as a simple in-process cache for development, swap to Redis or memcached for production, and configure everything through a unified interface. It has no runtime dependencies by default; optional backends require their respective client libraries installed separately. Use it for: - Cache results of expensive async database queries in a web framework. - Store serialized Python objects in Redis for sharing cached state across multiple processes. - Decorate async functions with @cached to automatically memoize results with configurable TTL and namespacing. - Switch from in-memory caching during development to memcached in production without changing application code. - Implement multi-key operations (multi_get, multi_set) to batch cache reads and writes efficiently. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides asyncio-compatible caching with pluggable backends (memory, Redis, memcached) and a uniform interface for get, set, delete, and other standard cache operations. Yes. aiocache is actively maintained, has no install friction, and provides a clean abstraction over multiple cache backends—valuable for async Python applications that may need to scale from development to production. The main caveat is the unclear license status; verify the actual license before committing to production use. No known vulnerabilities. ## Install pip install aiocache uv add aiocache poetry add aiocache ## Installing aiocache Before you install: Low install friction with no runtime dependencies. Actively maintained with recent commits and 1437 repository stars. Supports Python 3.7 through 3.11. License in practice: License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license before using in proprietary or restricted contexts. Quickstart: import asyncio from aiocache import Cache async def example(): cache = Cache(Cache.MEMORY) await cache.set('key', 'value') result = await cache.get('key') print(result) # 'value' asyncio.run(example()) Optional backends (Redis, memcached) need separate installation via pip install aiocache[redis] or aiocache[memcached]. Verify before relying: - Whether the package is licensed under an open-source or proprietary license (metadata shows no license declaration). - Performance characteristics and typical throughput for each backend type. - Whether serializers (PickleSerializer, JsonSerializer, MsgPackSerializer) are included by default or require extra dependencies. - Minimum Python version requirement (classifiers list 3.7 through 3.11 but requires_python is unspecified). ## Package facts - License: not declared (unclear) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 8.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags asyncio cache library, redis memcached wrapper, async caching backends, python async cache, multi-backend cache, aiocache decorator, async cache abstraction, asyncio, caching, redis-memcached [View on SkillFed](https://skillfed.io/packages/aiocache) · [View on PyPI](https://pypi.org/project/aiocache/)