flexcache
Saves and loads to the cache a transformed versions of a source object.
Decision gist · record as of 2026-08-14
Yes, if you need simple disk-based caching with automatic invalidation and can tolerate dormant maintenance. The package is stable (no known vulnerabilities, low install friction, permissive license) and solves a real problem—avoiding recomputation when source files haven't changed. However, expect no active bug fixes or compatibility updates; evaluate whether your project's stability requirements align with that trade-off.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >= 3.9; source objects and converters must be picklable for storage.
- Low friction to install; dormant maintenance status (last commit 2024-11-09, no releases for 888 days) means bug fixes and compatibility updates are unlikely, though the package remains functional.
License · maintenance · safety
BSD (permissive) — BSD license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.
last release 2024-03-09 (888 days) · last repo commit 2024-11-09 · 7 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 5,713,037 downloads/mo, #2,047 on PyPI
Alternatives
Verify before relying
from flexcache import DiskCacheByMTime
def parse(path):
with open(path) as f:
return f.read()
dc = DiskCacheByMTime(cache_folder="/tmp/cache")
content, basename = dc.load("source.txt", converter=parse)- Whether the package handles concurrent access safely or requires external locking
- Performance characteristics when cache folder contains many files
- Compatibility with Python versions beyond 3.11 given the long release dormancy
What it is and what it does
flexcache provides disk-based caching for the results of expensive computations—typically parsing or transformation functions. You define a source object (like a file path) and a converter function (like a parser), then use a DiskCache subclass to load the result; if the cache is fresh, it returns the stored result; if stale or missing, it runs the converter, stores the output, and returns it. The package detects staleness by modification time (DiskCacheByMTime) or by hashing file content (DiskCacheByHash), and stores results as pickled objects with JSON metadata.
The core design is extensible: you can subclass DiskCache and mix in header, invalidation, and naming strategies to customize how caching decisions are made. Built-in mixins let you track Python version and platform, validate cache freshness against single or multiple source files, and generate cache filenames from paths, file content, or arbitrary pickled objects. This flexibility makes it suitable for scenarios beyond simple file parsing—any source-to-converted-object transformation where you want persistent, invalidation-aware caching.
Use it for
- Cache parsed configuration or data files to avoid re-parsing on every application startup
- Speed up build pipelines by caching the output of expensive transformations and detecting source changes
- Store computed results of scientific calculations and reuse them when input files haven't changed
- Implement a persistent memoization layer for functions that process files or large datasets
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need simple disk-based caching with automatic invalidation and can tolerate dormant maintenance.
The package is stable (no known vulnerabilities, low install friction, permissive license) and solves a real problem—avoiding recomputation when source files haven't changed. However, expect no active bug fixes or compatibility updates; evaluate whether your project's stability requirements align with that trade-off.
Install
flexcache on PyPI
Before you install
Low friction to install; dormant maintenance status (last commit 2024-11-09, no releases for 888 days) means bug fixes and compatibility updates are unlikely, though the package remains functional.
Requires Python >= 3.9; source objects and converters must be picklable for storage.
License in practice
BSD license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.
Quickstart
from flexcache import DiskCacheByMTime
def parse(path):
with open(path) as f:
return f.read()
dc = DiskCacheByMTime(cache_folder="/tmp/cache")
content, basename = dc.load("source.txt", converter=parse)
Verify before relying
- Whether the package handles concurrent access safely or requires external locking
- Performance characteristics when cache folder contains many files
- Compatibility with Python versions beyond 3.11 given the long release dormancy
Package facts
| License | BSD permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagetyping-extensions |
| Maintenance | Dormant 888 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,713,037 / month, #2,047 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.9Topic :: Software Development :: LibrariesTopic :: System :: FilesystemsTopic :: Utilities |
Evidence: flexcache-0.3-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “disk caching for expensive functions”
- flexcacheCaches the results of expensive computations to disk, automatically…
- cache-to-diskA decorator that caches function results to disk with pickle…
- shelved-cacheWraps cachetools cache implementations with disk persistence,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also diskcache-weave · diskcache · cachey · diskcache-stubs · requests-cache · cashews · cache-to-disk · fcache · memoization · pystow