--- id: diskcache-weave version: "5.6.3.post1" license: Apache 2.0 license_treatment: permissive maintenance: active --- # diskcache-weave — Disk Cache -- Disk and file backed persistent cache. License: permissive · Maintenance: active · Downloads: 628.3K/mo ## 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 above — 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 pip install diskcache-weave uv add diskcache-weave 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_current - Install friction: low - Maintenance: active - Downloads: 628.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags disk-backed cache library, persistent key-value store, file-based caching, Django cache backend, cross-process cache, SQLite-based cache, memory-efficient caching, caching, django-compatible, persistent-storage [View on SkillFed](https://skillfed.io/packages/diskcache-weave) · [View on PyPI](https://pypi.org/project/diskcache-weave/)