{"categories":[{"label":"Libraries","url":"https://skillfed.io/packages/category/software-development-libraries/8"},{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/18"}],"enrichment":{"capability":"Theine is a high-performance in-memory cache with a Rust core, adaptive W-TinyLFU eviction, automatic expiration, and thread-safe operations including free-threading support.","skillfed_tags":["caching","rust-core","thread-safe"],"use_cases":["Cache expensive database queries or API responses in web applications to reduce latency and load.","Memoize function results in data processing pipelines to avoid redundant computation.","Store session data or temporary state in multi-threaded Python services with automatic expiration.","Use as a Django cache backend for application-level caching without external infrastructure.","Accelerate machine learning inference by caching model predictions or intermediate results."],"what_it_does":"Theine is an in-memory cache library for Python with a Rust-based core that implements an adaptive W-TinyLFU eviction policy. It stores key-value pairs in memory and automatically removes expired entries using a hierarchical timer wheel. The cache is fully typed, thread-safe by default, and supports free-threading in Python 3.13.6+.\n\nThe library provides both a direct Cache API for manual caching and a Memoize decorator for function result caching. It supports both synchronous and asynchronous functions, offers cache stampede protection, and includes a Django cache backend. Version 2.0 simplified the API by consolidating to a single eviction policy, changing Cache.get to return an explicit (value, exists) tuple, and renaming the timeout parameter to ttl.","worth_installing":"Yes, if you need a performant, thread-safe in-memory cache with minimal setup. The low install friction, permissive license, and lack of known vulnerabilities make it a safe choice. However, the aging maintenance status (362 days since last release) means you should verify that its feature set and performance characteristics match your workload before committing to production use."},"id":"theine","links":{"html":"https://skillfed.io/packages/theine","md":"https://skillfed.io/packages/theine.md","pypi":"https://pypi.org/project/theine/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2025-08-17","license_spdx":"BSD-3-Clause","license_treatment":"permissive","name":"theine","python_support":"supports_current","summary":"high performance in-memory cache"},"popularity":{"monthly_downloads":144330,"position":11154,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"2.0.0"}
