diskcache
Disk Cache -- Disk and file backed persistent cache.
Install
diskcache on PyPI
pip
pip install diskcacheuv
uv add diskcachepoetry
poetry add diskcachePackage facts
| License | Apache 2.0 (permissive) |
| Python support | supports the current Python release (>=3) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 1,078 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | 2 — GHSA-w8v5-vhqr-4h9v, PYSEC-2026-2447 |
Evidence: diskcache-5.6.3-py3-none-any.whl
About diskcache
from the package's own PyPI description — quoted content, verbatim
DiskCache: Disk Backed Cache
DiskCache_ is an Apache2 licensed disk and file backed cache library, written
in pure-Python, and compatible with Django.
The cloud-based computing of 2023 puts a premium on memory. Gigabytes of empty space is left on disks as processes vie for memory. Among these processes is Memcached (and sometimes Redis) which is used as a cache. Wouldn't it be nice to leverage empty disk space for caching?
Django is Python's most popular web framework and ships with several caching backends. Unfortunately the file-based cache in Django is essentially broken. The culling method is random and large caches repeatedly scan a cache directory which slows linearly with growth. Can you really allow it to take sixty milliseconds to store a key in a cache with a thousand items?
In Python, we can do better. And we can do it in pure-Python!
::
In [1]: import pylibmc In [2]: client = pylibmc.Client(['127.0.0.1'], binary=True) In [3]: client[b'key'] = b'value' In [4]: %timeit client[b'key']
10000 loops, best of 3: 25.4 µs per loop
In [5]: import diskcache as dc In [6]: cache = dc.Cache('tmp') In [7]:...
Read as markdown · JSON record · Source repository · Homepage · Docs
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
DiskCache provides a pure-Python disk-backed cache library that stores key-value pairs using SQLite and the filesystem, offering thread-safe and process-safe caching with support for multiple eviction policies and Django integration.
Installation is straightforward with no compiled dependencies; the package is pure-Python and carries low friction. However, the project is dormant—last release was 2023-08-31 and no commits since 2024-08-10—so expect no active maintenance or security updates.
Apache 2.0 is a permissive license that allows commercial and private use with minimal restrictions, making it suitable for most projects. You must include a copy of the license and note any modifications.
Usage
pip install diskcache
import diskcache
cache = diskcache.Cache('/tmp/mycache')
cache['key'] = 'value'
print(cache['key'])
Verdict: DiskCache is a stable, well-tested pure-Python caching solution with zero runtime dependencies and permissive licensing, suitable for applications needing disk-backed persistence. However, the project is dormant (no releases since August 2023), so it carries security risk if vulnerabilities are discovered; two known vulnerabilities (GHSA-w8v5-vhqr-4h9v, PYSEC-2026-2447) are already present.
Needs verification
- Severity and exploitability of the two known vulnerabilities (GHSA-w8v5-vhqr-4h9v, PYSEC-2026-2447) and whether they affect version 5.6.3
- Whether dormant status reflects stable maturity or abandoned maintenance risk for your use case
- Compatibility with Python versions beyond 3.9 (classifiers list up to 3.9; current Python is 3.12+)
Similar packages
permissive · top 1,000 on PyPI
python-discoverypermissive · top 1,000 on PyPI
aiosqlitepermissive · top 1,000 on PyPI
CacheControlpermissive · top 1,000 on PyPI
tblibpermissive · top 1,000 on PyPI
py-key-value-aiopermissive · top 1,000 on PyPI
filelockpermissive · top 100 on PyPI
hf-xetpermissive · top 1,000 on PyPI
networkxpermissive · top 1,000 on PyPI
nh3permissive · top 1,000 on PyPI