--- id: cachetools version: "7.1.7" license: MIT license_treatment: permissive maintenance: active --- # cachetools — Extensible memoizing collections and decorators License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install cachetools uv add cachetools poetry add cachetools ## Description cachetools ======================================================================== .. image:: https://img.shields.io/pypi/v/cachetools :target: https://pypi.org/project/cachetools/ :alt: Latest PyPI version .. image:: https://img.shields.io/github/actions/workflow/status/tkem/cachetools/ci.yml :target: https://github.com/tkem/cachetools/actions/workflows/ci.yml :alt: CI build status .. image:: https://img.shields.io/readthedocs/cachetools :target: https://cachetools.readthedocs.io/ :alt: Documentation build status .. image:: https://img.shields.io/codecov/c/github/tkem/cachetools/master.svg :target: https://codecov.io/gh/tkem/cachetools :alt: Test coverage .. image:: https://img.shields.io/github/license/tkem/cachetools :target: https://raw.github.com/tkem/cachetools/master/LICENSE :alt: License This module provides various memoizing collections and decorators, including variants of the Python Standard Library's `@lru_cache`_ function decorator. .. code-block:: python from cachetools import cached, LRUCache, TTLCache # speed up calculating Fibonacci numbers with dynamic programming @cached(cache={}) def fib(n): return n... ## AI interpretation — verify before relying Provides memoizing collections and decorators for caching function results with multiple cache algorithms (LRU, TTL, FIFO) and eviction strategies, similar to Python's standard library @lru_cache but with more flexibility. Verdict: cachetools is a mature, actively maintained caching library with zero known vulnerabilities, no external dependencies, and permissive MIT licensing. It offers production-ready cache implementations with multiple eviction strategies and is well-suited for performance optimization in Python applications. [View on SkillFed](https://skillfed.io/packages/cachetools) · [View on PyPI](https://pypi.org/project/cachetools/)