CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-cacache

Fast, fault-tolerant, cross-platform, disk-based, data-agnostic, content-addressable cache.

90

1.16x
Overview
Eval results
Files

rubric.jsonevals/scenario-1/

{
  "context": "Evaluates whether the solution uses cacache's integrity presence APIs to report existence metadata without reading cached payloads. Focuses on digest-based lookups, canonical integrity handling, and aggregation derived from presence results.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses hasContent",
      "description": "Uses `cacache.get.hasContent(cachePath, integrity)` (or an equivalent integrity-only probe) for each digest instead of fetching data via `get` or read streams, avoiding any content reads.",
      "max_score": 40
    },
    {
      "name": "Canonical SRI",
      "description": "Populates the returned canonical integrity string from the hasContent response (e.g., `result.sri.toString()`), rather than echoing the input digest or leaving it blank.",
      "max_score": 20
    },
    {
      "name": "Size from metadata",
      "description": "Takes byte sizes from the hasContent metadata (or null when missing) and does not compute size by reading files or buffers.",
      "max_score": 15
    },
    {
      "name": "Aggregate summary",
      "description": "Derives total/found/missing counts and foundSize purely from the integrity presence results without extra cache fetches or data reads.",
      "max_score": 15
    },
    {
      "name": "Missing digest handling",
      "description": "Gracefully handles hasContent misses (null/undefined) by preserving input order and returning found=false, size=null, and actualIntegrity=null for absent digests.",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-cacache

tile.json