Skip to content

Latest commit

 

History

History
60 lines (41 loc) · 1.28 KB

File metadata and controls

60 lines (41 loc) · 1.28 KB

python-diskcache

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.

Tech Stack

  • Python
  • SQLite
  • setuptools
  • tox
  • pytest
  • Django integration tests

Quick Start

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

Demo / Usage

from diskcache import Cache

cache = Cache("tmp-cache")
cache["answer"] = 42
print(cache["answer"])
cache.close()

Project Structure

  • 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.