--- id: cacheout version: "0.16.0" license: MIT License license_treatment: permissive maintenance: dormant --- # cacheout — A caching library for Python License: permissive · Maintenance: dormant · Downloads: 896.4K/mo ## What it is and what it does Cacheout is a pure-Python in-memory caching library that stores key-value pairs with configurable eviction policies and optional time-based expiration. It offers six eviction strategies (FIFO, LIFO, LRU, MRU, LFU, RR) and supports TTL per entry or globally, with a maximum cache size enforced by the chosen policy. The library is thread-safe and provides bulk operations, filtering by string/regex/function, and event callbacks for cache lifecycle events. It is typically used to reduce computation or I/O by caching function results via the memoization decorator, managing multiple independent caches through CacheManager, or as a simple session or data store within a single process. The package has no external runtime dependencies, making it lightweight to add to existing projects. Maintenance is dormant but the codebase is stable; the last release added callback hooks and statistics tracking. Use it for: - Memoize expensive function calls to avoid recomputation within a single process or application session - Implement a simple session store or temporary data cache with automatic expiration via TTL - Manage multiple independent caches (e.g., for different data types or modules) using CacheManager - Cache API responses or database query results with LRU eviction to bound memory usage - Track cache hit/miss statistics and performance metrics using built-in stats tracking ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Cacheout provides in-memory caching with multiple eviction strategies (FIFO, LIFO, LRU, MRU, LFU, RR), TTL support, memoization decorators, and thread safety for Python applications. Yes, if you need a lightweight, dependency-free in-memory cache with multiple eviction strategies and TTL support for a single-process application. The dormant maintenance status (last release 900+ days ago) is acceptable for a stable caching library with no active security vulnerabilities, but monitor the repository if you require ongoing feature development or rapid bug fixes. Not suitable if you need distributed caching or Redis-like persistence. ## Install pip install cacheout uv add cacheout poetry add cacheout ## Installing cacheout Before you install: Low install friction with no runtime dependencies. Maintenance is dormant—last release was 2023-12-22, over 900 days ago—but the repository remains active and the package supports current Python versions (3.7–3.12). License in practice: MIT License (permissive) allows commercial and private use with minimal restrictions; you may use, modify, and distribute freely provided you include the license notice. Quickstart: pip install cacheout from cacheout import Cache cache = Cache(maxsize=256, ttl=0) cache.set('key', 'value') assert cache.get('key') == 'value' Requires Python >= 3.7 Verify before relying: - Performance characteristics (throughput, latency) compared to alternatives under typical workloads - Thread-safety guarantees under high concurrency or with custom eviction strategies - Memory overhead per cached entry relative to raw dictionary storage ## Package facts - License: MIT License (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 896.4K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags in-memory cache library, python caching with TTL, memoization decorator, LRU cache implementation, cache eviction strategies, thread-safe cache, cache manager multiple caches, in-memory-cache, memoization, eviction-policies [View on SkillFed](https://skillfed.io/packages/cacheout) · [View on PyPI](https://pypi.org/project/cacheout/)