Implements path-independent, auto-invalidating cache systems for expensive file processing tasks using SHA-256 content hashes.
This skill provides a robust architecture for caching the results of high-latency file operations such as PDF parsing, OCR, and AI-driven image analysis. By utilizing SHA-256 content hashes as cache keys instead of file paths, the system ensures that renamed or moved files still result in cache hits, while any modification to file content triggers automatic invalidation. It follows clean architecture principles by implementing a service-layer wrapper, allowing developers to add high-performance caching to existing pure functions without violating the Single Responsibility Principle.
Características Principales
01SHA-256 content-based hashing for path-independent caching
02O(1) file-based lookup system with no central index required
03Chunked file processing to handle large assets without memory spikes
04Service layer separation to keep processing logic pure
05Graceful degradation that treats corrupted cache files as misses
060 GitHub stars
Casos de Uso
01CLI tools that require high-performance --cache and --no-cache options
02Document processing pipelines involving expensive PDF or text extraction
03Batch AI analysis of image or media assets where files are frequently moved