Skip to content

marwansakas/python-diskcache

 
 

Repository files navigation

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.

About

Fork of DiskCache, a pure-Python disk-backed cache library with tests and docs.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%