skillfed

cachey

Caching mindful of computation/storage costs

cachey v0.2.1 225.3K downloads/30d#9,225 on PyPI142
Permissive license BSD Abandoned released

What it is and what it does

Cachey is a caching library designed for analytic computations where standard policies like LRU are ineffective because computation and storage costs vary wildly. It scores cached items based on their recomputation cost, storage size, frequency of use, and recency, keeping results that are expensive to recompute but cheap to store while evicting cheap-to-recompute but large results. The package provides a Cache class for manual cache management and a memoize decorator for automatic function result caching.

The library targets scientific and data-analysis workflows where a single computation might be costly but yield a small result, while another might be cheap but produce large data. It accomplishes this through a scoring formula that balances these trade-offs with exponential decay of old items. However, the package is no longer maintained—its last release was in 2020 and the last commit in early 2021—so it receives no updates, bug fixes, or compatibility improvements.

Use it for:

  • Cache expensive computations that produce small results in analytical workflows.
  • Memoize costly data-processing functions in analytical pipelines where storage is limited.
  • Manage memory in long-running data science workflows by automatically evicting cheap-to-recompute intermediate results.
  • Optimize task graphs or similar lazy-evaluation systems where computation cost varies widely.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Cachey provides intelligent caching for analytic computations, prioritizing results that are expensive to recompute, cheap to store, and frequently used, rather than using simple LRU policies.

No. While the package has low install friction and addresses a real problem in analytic computing, it is abandoned and unmaintained. The last release was in 2020, the last commit in 2021, and no security or compatibility updates are forthcoming. For new projects, use an actively maintained alternative; for existing code already using cachey, consider migration to reduce technical debt.

Install

cachey on PyPI

pip

pip install cachey

uv

uv add cachey

poetry

poetry add cachey

Installing cachey

Before you install

Low install friction with a single dependency (heapdict). However, the package is abandoned—last commit was 2021-02-10 and no releases since 2020-03-11—so maintenance and bug fixes are not forthcoming.

License in practice

BSD license is permissive, allowing use in most projects without significant legal constraints.

Quickstart

from cachey import Cache
c = Cache(1e9, 1)  # 1 GB cache, cost threshold 1
c.put('x', 'some value', cost=3)
result = c.get('x')

Requires Python 3.6 or later.

Verify before relying

  • Whether the package's scoring algorithm remains suitable for modern analytic workloads.
  • Real-world performance and memory overhead compared to alternatives in active maintenance.
  • Compatibility with current versions of scientific libraries.

Package facts

License BSD (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 1 — heapdict
Maintenance abandoned — 2,347 days since the last release
Last repo commit
First released
Downloads 225,252/month — #9,225 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: cachey-0.2.1-py3-none-any.whl

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Topic :: Scientific/Engineering

Tags

analytic computation cachingcost-aware cache managementmemoization for expensive functionsstorage-efficient result cachingcomputation cost aware caching
abandoned-unmaintainedcost-aware-caching

More Scientific/Engineering packages