Theine is a high performance in-memory cache library for Python, supporting TTL, LRU, LFU, and clock-based eviction policies. Current version 2.0.0 (release 2025 Q1) requires Python >=3.9. It offers optimized caching for applications needing low latency and high throughput.
pip install theineVerified import paths — ran on the pinned version, not inferred.
Create a simple key-value cache and perform get/set operations.
Use `from theine import Cache` and create cache with `Cache('key-value')` instead of `Theine()`.Replace `TTLCache()` with `Cache('ttl')` and `LRUCache()` with `Cache('lru')`.Ensure the policy string exactly matches the documented options (lowercase, no spaces).
Change import to `from theine import Cache` and update instantiation to `Cache('key-value')`.Use exactly the policy names: 'key-value', 'ttl', 'lru', 'lfu', or 'clock'. Ensure lowercase and correct spelling.
No dependency data recorded yet.