{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/7"}],"enrichment":{"capability":"OneCache provides LRU-based caching decorators for both synchronous and asynchronous Python functions, with optional per-entry TTL expiration and configurable memory limits.","skillfed_tags":["caching","lru-cache","async-support"],"use_cases":["Cache expensive database queries or API calls in web applications to reduce latency and load.","Memoize computationally intensive calculations in data processing pipelines with automatic expiration.","Speed up async coroutines by caching results across multiple concurrent requests with TTL-based invalidation.","Reduce redundant function calls in long-running services where results are valid for a limited time window.","Implement request-level or session-level caching in frameworks without external cache infrastructure."],"what_it_does":"OneCache is a lightweight in-memory caching library that wraps functions with LRU (Least Recently Used) eviction and optional time-to-live expiration. It provides two decorator classes\u2014CacheDecorator for sync functions and AsyncCacheDecorator for async coroutines\u2014allowing you to cache function results without modifying function signatures. The cache automatically evicts the oldest entry when it reaches maxsize, and can optionally expire entries after a specified TTL in milliseconds. You can also set memory size limits and enable thread-safe locking for concurrent access.\n\nThe library is designed for straightforward use: decorate a function, configure cache size and TTL, and results are automatically cached and reused on subsequent calls with identical arguments. It supports skipping arguments from the cache key, refreshing TTL on each access, and choosing alternative cache implementations via the cache_class parameter.","worth_installing":"Yes. OneCache is a solid choice for lightweight, decorator-based caching in Python applications. It has zero runtime dependencies, is actively maintained, supports modern Python versions (3.8\u20133.14), carries no security vulnerabilities, and works seamlessly with both sync and async code. Install it if you need simple LRU caching with optional TTL and don't want to manage an external cache service."},"id":"onecache","links":{"html":"https://skillfed.io/packages/onecache","md":"https://skillfed.io/packages/onecache.md","pypi":"https://pypi.org/project/onecache/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-02-20","license_spdx":null,"license_treatment":"permissive","name":"onecache","python_support":"supports_current","summary":"Python cache for sync and async code"},"popularity":{"monthly_downloads":725663,"position":5220,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.8.1"}
