{"categories":[{"label":"Libraries","url":"https://skillfed.io/packages/category/software-development-libraries/2"},{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/2"},{"label":"Filesystems","url":"https://skillfed.io/packages/category/system-filesystems"}],"enrichment":{"capability":"Caches the results of expensive computations to disk, automatically detecting when source files change and invalidating stale cached data based on file modification time or content hash.","skillfed_tags":["caching","memoization","file-based-storage"],"use_cases":["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"],"what_it_does":"flexcache provides disk-based caching for the results of expensive computations\u2014typically 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.\n\nThe 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\u2014any source-to-converted-object transformation where you want persistent, invalidation-aware caching.","worth_installing":"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\u2014avoiding 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."},"id":"flexcache","links":{"html":"https://skillfed.io/packages/flexcache","md":"https://skillfed.io/packages/flexcache.md","pypi":"https://pypi.org/project/flexcache/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2024-03-09","license_spdx":null,"license_treatment":"permissive","name":"flexcache","python_support":"supports_current","summary":"Saves and loads to the cache a transformed versions of a source object."},"popularity":{"monthly_downloads":5713037,"position":2047,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.3"}
