skillfed

diskcache-weave

Disk Cache -- Disk and file backed persistent cache.

diskcache-weave v5.6.3.post1 628.3K downloads/30d#5,675 on PyPI2,903
Permissive license Apache 2.0 Active released

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-weave

uv

uv add diskcache-weave

poetry

poetry add diskcache-weave

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPython

Tags

disk-backed cache librarypersistent key-value storefile-based cachingDjango cache backendcross-process cacheSQLite-based cachememory-efficient caching
cachingdjango-compatiblepersistent-storage

More Database packages