什么是 content-hash-cache-pattern?
在缓存昂贵的文件处理结果时使用。具有冻结 CacheEntry 和服务层包装器的 SHA-256 内容哈希键控。 来源:shimo4228/claude-code-learned-skills。
在缓存昂贵的文件处理结果时使用。具有冻结 CacheEntry 和服务层包装器的 SHA-256 内容哈希键控。
通过命令行快速安装 content-hash-cache-pattern AI 技能到你的开发环境
来源:shimo4228/claude-code-learned-skills。
Extracted / 抽出日: 2026-02-10 Context / コンテキスト: ファイル処理結果をSHA-256ハッシュでキャッシュし、サービス層でラップするパターン
| SHA-256 content hash | Path-independent, auto-invalidates on content change | | {hash}.json file naming | O(1) lookup, no index file needed | | Service layer wrapper | SRP: extraction stays pure, cache is separate concern | | Manual JSON serialization | Full control over frozen dataclass serialization |
| Corruption → None | Graceful degradation, re-extracts on next run | | cachedir.mkdir(parents=True) | Lazy directory creation on first write |
在缓存昂贵的文件处理结果时使用。具有冻结 CacheEntry 和服务层包装器的 SHA-256 内容哈希键控。 来源:shimo4228/claude-code-learned-skills。
为搜索与 AI 引用准备的稳定字段与命令。
npx skills add https://github.com/shimo4228/claude-code-learned-skills --skill content-hash-cache-patternBrowse more skills from shimo4228/claude-code-learned-skills
在缓存昂贵的文件处理结果时使用。具有冻结 CacheEntry 和服务层包装器的 SHA-256 内容哈希键控。 来源:shimo4228/claude-code-learned-skills。
打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/shimo4228/claude-code-learned-skills --skill content-hash-cache-pattern 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用
https://github.com/shimo4228/claude-code-learned-skills