Registry / data / cachey

cachey

JSON →
library0.2.1pypiunverified

Cachey is a Python library from Dask designed for caching in analytic computations where the costs of recomputation and storage can vary significantly. Unlike traditional caching policies (e.g., LRU), Cachey is mindful of these varying costs. The latest PyPI version is 0.2.1, released in March 2020. The project README states it is 'new and not robust'.

dataworkflow
Install & Compatibility
Where this runs
tested against v0.2.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.9MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 1.6s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

from cachey import Cache

This example demonstrates how to initialize `Cachey` with a memory limit and use the `@cache.memoize` decorator to cache the results of an expensive function. The `key` and `cost` parameters help Cachey manage its eviction policy effectively.

from cachey import Cache from time import sleep # Initialize a cache with a 2 GB limit cache = Cache(2 * 10**9) @cache.memoize(key='my-expensive-function', cost=100) # Define key and estimated cost def my_expensive_function(x): print(f"Computing for {x}...") sleep(0.1) # Simulate expensive computation return x + 1 # First call will compute and cache result1 = my_expensive_function(1) print(f"Result 1: {result1}") # Second call with same arguments will retrieve from cache result2 = my_expensive_function(1) print(f"Result 2: {result2}") # Call with different arguments will compute and cache separately result3 = my_expensive_function(2) print(f"Result 3: {result3}")
Debug
Known footguns
gotchaThe official GitHub README for Cachey explicitly states: 'Cachey is new and not robust.' Users should be aware that the library might have unaddressed issues or lack full stability, and it may not be suitable for critical production systems without thorough testing.
deprecatedThe last release of Cachey (v0.2.1) was on March 11, 2020. This indicates a lack of active development and maintenance, which may lead to unpatched bugs, security vulnerabilities, or incompatibility with newer Python versions or related libraries.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
18 hits · last 30 days
gptbot
4
ahrefsbot
4
dotbot
1
script
1
Resources

No resource links recorded.