content-hash-cache-pattern

Community

Cache file processing by content hash for speed.

Authorshimo4228
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Caching expensive file processing results by content hash rather than file path ensures cache validity across moves, renames, and content changes.

Core Features & Use Cases

  • Content-hash based cache key using SHA-256 to uniquely identify file contents.
  • Frozen dataclass (immutable CacheEntry) to guarantee cache entry integrity.
  • Service-layer wrapper to keep core processing pure while handling caching concerns.
  • Graceful handling of corrupted cache entries with safe fallback.

Quick Start

Implement a content-hash cache wrapper around the expensive file-processing function and verify a cache hit on a sample file.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: content-hash-cache-pattern
Download link: https://github.com/shimo4228/claude-code-learned-skills/archive/main.zip#content-hash-cache-pattern

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.