A high performance caching library for Python, written in Rust with PyO3. Provides a concurrent hashmap cache with TTL, TTI, size-based eviction, and a decorator for async/sync functions. Current version 0.3.0, actively maintained, monthly releases.
pip install moka-pyVerified import paths — ran on the pinned version, not inferred.
Create a cache with max 100 entries and 5-minute TTL.
Use cache.get('key') and handle None, or use cache.get_or_insert('key', default_value).Update to >=0.2.1 or pass `wait_concurrent=True` explicitly.
Use `cache.pop(key, default=None)` instead of `cache.remove(key, default=None)`.
No dependency data recorded yet.