diskcache-weave
Disk Cache -- Disk and file backed persistent cache.
What it is and what it does
Diskcache-weave is a pure-Python caching library that uses disk and file storage to back cache operations, designed to leverage unused disk space in memory-constrained environments. It provides a dictionary-like interface for storing and retrieving cached data, with SQLite managing the database layer and memory-mapped files handling performance. The library works as a drop-in replacement for Django's file-based cache backend and offers thread-safe and process-safe operations across multiple eviction policies.
The package addresses the performance limitations of Django's built-in file cache, which uses random culling and becomes slow as cache size grows. Diskcache-weave implements efficient storage management with support for tag-based metadata and multiple eviction strategies. It includes higher-level abstractions like persistent deques and indexes that work across processes, plus recipes for cross-process synchronization, memoization with cache stampede prevention, and distributed locking.
Use it for:
- Replace Memcached or Redis in Django applications where disk space is available but memory is constrained
- Cache API responses or database query results in web applications to reduce load on backend services
- Implement persistent job queues or work-in-progress tracking across multiple worker processes
- Store computed results or intermediate data in data processing pipelines with cross-process access
- Build cross-process synchronization primitives like locks and throttles without external services
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Disk-backed cache library that stores key-value pairs on disk and in files, providing a pure-Python alternative to in-memory caching systems like Memcached.
Yes, if you need disk-backed caching in a pure-Python environment without external dependencies. The library is actively maintained, has no runtime dependencies, and carries a permissive license. Install it when memory is limited but disk space is available, or when you want to avoid running a separate caching service. Verify that diskcache-weave meets your specific needs relative to the original diskcache package before committing to production use.
Install
diskcache-weave on PyPI
pip
pip install diskcache-weaveuv
uv add diskcache-weavepoetry
poetry add diskcache-weaveInstalling diskcache-weave
Before you install
Low friction installation with no runtime dependencies. Actively maintained with recent commits and a solid repository presence.
License in practice
Apache 2.0 permissive license allows use in commercial and proprietary projects with minimal restrictions.
Quickstart
pip install diskcache-weave
import diskcache as dc
cache = dc.Cache('tmp')
cache['key'] = 'value'
print(cache['key'])
Verify before relying
- Whether diskcache-weave is a fork or variant of the original diskcache package and how they differ
- Performance characteristics compared to the original diskcache under real workloads
- Whether all documented features (FanoutCache, DjangoCache, Deque, Index, recipes) are present in this variant
Package facts
| License | Apache 2.0 (permissive) |
| Python support | supports the current Python release (>=3) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 148 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 628,295/month — #5,675 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: diskcache_weave-5.6.3.post1-py3-none-any.whl
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
diskcacheDiskCache provides a pure-Python disk-backed…
permissive · top 1,000 on PyPI
fcachefcache provides a dictionary-like file-based…
permissive · top 5,000 on PyPI
flexcacheCaches the results of expensive computations to…
permissive · top 5,000 on PyPI
diskcache-stubsProvides type hints and stubs for the diskcache…
permissive · top 15,000 on PyPI
picklesharePickleShare provides a dictionary-like…
permissive · top 5,000 on PyPI
cache-to-diskA decorator that caches function results to…
permissive · top 15,000 on PyPI
cashewsAsync cache framework with decorator and direct…
permissive · top 15,000 on PyPI
pylruProvides a pure-Python LRU (least recently…
permissive · top 15,000 on PyPI
requests-cacheAdds persistent HTTP caching to the requests…
permissive · top 5,000 on PyPI
nab-indexA typed PyPI Simple-API client with on-disk…
permissive · top 15,000 on PyPI