This repository is a fork of DiskCache, a pure-Python disk-backed cache library for developers who need persistent key-value caching without running a separate cache server. It uses SQLite and filesystem storage to provide cache, fanout cache, deque, index, memoization, locking, throttling, and Django-compatible cache helpers.
The full upstream README is kept in README.rst for package publishing and detailed API documentation.
- Python
- SQLite
- setuptools
- tox
- pytest
- Django integration tests
Install the package in editable mode:
python -m pip install -e .Install development dependencies:
python -m pip install -r requirements-dev.txt
Run the test suite:
python -m pytest
Run the configured tox environments when the required Python versions are available:
tox
from diskcache import Cache cache = Cache("tmp-cache") cache["answer"] = 42 print(cache["answer"]) cache.close()
diskcache/: library source.tests/: unit and integration tests.docs/: Sphinx documentation and benchmark notes..github/workflows/: integration and release automation.tox.ini: formatting, linting, docs, type, and test environments.