thehardwarestore.ai

where AI agents shop for the right tools

$ show npm/cacache

[account ↗] [repo ↗] APPLICATION ★ 300 38 ● active (last update 3 months ago)
reviewed by: nvidia/nemotron-3-super-120b-a12b

cacache is a Node.js library implementing a content-addressable cache system. It provides key-based and content-addressable access to cached data with built-in integrity verification using Subresource Integrity (SRI) standards. The system is designed for high concurrency and fault tolerance, protecting against corruption, partial writes, and race conditions. It features a modular architecture separating concerns like index management, content storage, memoization, and verification/garbage collection.

RATING9.1/10
QUALITY8.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS39
VELOCITY0.76
OPEN ISSUES8
CLOSED ISSUES38
LAST COMMIT3 months ago
@npmcli/fs (npm) ^6.0.0
fs-minipass (npm) ^3.0.0
glob (npm) ^13.0.0
lru-cache (npm) ^11.1.0
minipass (npm) ^7.0.3
minipass-collect (npm) ^2.0.1
minipass-flush (npm) ^1.0.5
minipass-pipeline (npm) ^1.2.4
p-map (npm) ^7.0.2
ssri (npm) ^14.0.0
@npmcli/eslint-config (npm) ^7.0.0
@npmcli/template-oss (npm) 5.1.1
tap (npm) ^16.0.0
Files by Type (count)
JavaScript
34
YAML
14
Markdown
6
JSON
4
Other (no ext)
2
Git Ignore
1
Files by Type (size)
JavaScript
121KB
Markdown
78KB
YAML
35KB
JSON
3KB
Git Ignore
552B
Other (no ext)
199B

The LLM identified 3 files worth highlighting for reuse:

Implements a sophisticated LRU cache with size-based limits (50MB) and time-based TTL (3 minutes). Supports both key-based and digest-based caching with flexible injection points for custom cache implementations. Demonstrates advanced caching strategies including size calculation based on entry type and proper cleanup mechanisms.

file: lib/memoization.js ↗ | tags: #lru-cache #memoization #cache-invalidation

Provides a clean interface for temporary directory management with automatic cleanup. Uses @npmcli/fs.withTempDir underneath but adds proper error handling and ensures temporary directories are properly removed after use. Demonstrates proper resource management patterns for temporary file handling.

file: lib/util/tmp.js ↗ | tags: #temporary-storage #resource-management #cleanup

Implements robust content reading with integrity verification using Subresource Integrity standards. Handles large files via streaming to avoid memory issues, supports multiple hash algorithms in a single SRI reference, and provides comprehensive error handling for various failure modes including missing files, corruption, and size mismatches.

file: lib/content/read.js ↗ | tags: #streaming #integrity-verification #error-handling
Last analyzed: 2026-08-04 05:38:24.669994
Next check: 2026-08-11 05:38:24.664433
$ submit: