{"categories":[{"label":"Libraries","url":"https://skillfed.io/packages/category/software-development-libraries/4"},{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/7"}],"enrichment":{"capability":"Decorator-based function result caching with configurable TTL, multiple eviction algorithms (LRU, LFU, FIFO), and support for unhashable arguments.","skillfed_tags":["caching","decorator","memoization"],"use_cases":["Cache expensive database queries with automatic expiration using TTL to keep results fresh.","Decorate API client methods to avoid redundant network calls while respecting rate limits.","Memoize recursive algorithms or mathematical computations with bounded cache size using LFU or FIFO eviction.","Cache results of functions accepting unhashable arguments (dicts, lists) that functools.lru_cache cannot handle.","Monitor cache effectiveness in production via cache_info() to tune max_size and algorithm choice."],"what_it_does":"Memoization is a decorator-based caching library that stores function results to avoid recomputation on repeated calls with the same arguments. It extends Python's built-in functools.lru_cache by adding TTL (time-to-live) expiration, multiple eviction algorithms (LRU, LFU, FIFO), support for unhashable argument types like dicts and lists, and custom cache key generation. The library is thread-safe by default and provides cache statistics (hits, misses, size) for monitoring.\n\nThe package is designed for functions where repeated computation is expensive\u2014database queries, API calls, or complex calculations\u2014and where you need finer control over cache behavior than the standard library offers. It handles edge cases like hash collision attacks by always treating arguments as typed (f(3) and f(3.0) cache separately) and allows custom key makers for non-built-in object types.","worth_installing":"No\u2014the package is abandoned (last update August 2021, no commits for 1839 days) and receives no maintenance or security updates. While the MIT license is permissive and the library is stable for existing code, the high install friction combined with unmaintained status makes it a poor choice for new projects. Consider functools.lru_cache for standard use cases or an actively maintained alternative for TTL/algorithm flexibility."},"id":"memoization","links":{"html":"https://skillfed.io/packages/memoization","md":"https://skillfed.io/packages/memoization.md","pypi":"https://pypi.org/project/memoization/"},"maintenance":{"status":"abandoned"},"meta":{"latest_release":"2021-08-01","license_spdx":null,"license_treatment":"permissive","name":"memoization","python_support":"supports_current","summary":"A powerful caching library for Python, with TTL support and multiple algorithm options. (https://github.com/lonelyenvoy/python-memoization)"},"popularity":{"monthly_downloads":1253785,"position":4157,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.4.0"}
