fcache
a dictionary-like, file-based cache module for Python
What it is and what it does
fcache is a lightweight, file-based cache module that wraps Python's shelve interface into a simple dictionary-like API. It stores cached key-value pairs directly to disk, making it useful for applications that need persistent caching without setting up a separate database server. The package supports standard dictionary operations (get, set, delete, iteration) and can be used as a context manager. It includes an optional write buffer to batch disk writes and reduce I/O overhead.
The module is designed for straightforward use cases where you need to cache data across application restarts. It depends only on platformdirs for cross-platform cache directory discovery, keeping the dependency footprint minimal. The package supports Python 3.9 through 3.13 and is classified as production-stable, though development has been dormant since its last release.
Use it for:
- Cache application configuration or computed results to disk for reuse across program restarts
- Store temporary data in a simple key-value format without managing a separate database
- Build a lightweight session store for small-to-medium workloads that don't require a full cache server
- Persist memoized function results to disk for offline-capable applications
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
fcache provides a dictionary-like file-based cache that persists data to disk, with an optional write buffer and Shelf compatibility for simple key-value storage without a database.
Yes, if you need simple file-based caching without external dependencies. The low install friction, permissive MIT license, and stable API make it suitable for small-to-medium projects. However, the dormant maintenance status means you should verify that the package meets your performance and concurrency requirements before adopting it in production; consider alternatives if you need active support or expect heavy use.
Install
fcache on PyPI
pip
pip install fcacheuv
uv add fcachepoetry
poetry add fcacheInstalling fcache
Before you install
Installation is straightforward with low friction; the package has one runtime dependency (platformdirs) and is distributed as a pure Python wheel. Maintenance is dormant—last commit was 2024-11-19 but no releases in 633 days—so expect no active bug fixes or feature updates.
License in practice
fcache is released under the MIT License, a permissive open-source license that allows commercial and private use with minimal restrictions, making it safe to adopt in most projects.
Quickstart
pip install fcache
from fcache.cache import FileCache
mycache = FileCache('myapp')
mycache['key'] = 'value'
print(mycache['key'])
Requires Python 3.9 or later; platformdirs must be installed (handled automatically by pip).
Verify before relying
- Whether the write buffer implementation is suitable for high-concurrency or high-throughput scenarios
- Performance characteristics compared to other file-based cache solutions
- Whether dormant status means the package is stable or at risk of incompatibility with future Python versions
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — platformdirs |
| Maintenance | dormant — 633 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,034,387/month — #2,779 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: fcache-0.6.0-py3-none-any.whl
Keywords: cache, file, serialize
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
diskcacheDiskCache provides a pure-Python disk-backed…
permissive · top 1,000 on PyPI
diskcache-weaveDisk-backed cache library that stores key-value…
permissive · top 15,000 on PyPI
picklesharePickleShare provides a dictionary-like…
permissive · top 5,000 on PyPI
partdPartd is a key-value byte store that appends…
permissive · top 1,000 on PyPI
shelved-cacheWraps cachetools cache implementations with…
permissive · top 5,000 on PyPI
speedictSpeeDict is a Python key-value storage library…
permissive · top 15,000 on PyPI
flexcacheCaches the results of expensive computations to…
permissive · top 5,000 on PyPI
cache-to-diskA decorator that caches function results to…
permissive · top 15,000 on PyPI
persist-queueProvides thread-safe, disk-based queue…
permissive · top 15,000 on PyPI
sharedShared provides a simple file-based data…
permissive · top 15,000 on PyPI