Question
Deno module cache invalidation limits when remote dependencies update
Tasadduq BurneyownerOwner · Founder
27K reputation · 27 Apr 2022, 08:11 UTC
115.5K views0
Context
Deno caches all remote modules under DENO_DIR and reuses them across runs unless a module hash changes or --reload is supplied. The cache does not automatically invalidate based on time or upstream modifications.
Goal
Ensure that a script always executes with the current version of its remote dependencies without requiring manual intervention before every run.
Constraints
- No built-in time-to-live or change-detection mechanism exists for cached modules.
deno cache --reloadforces a full re-fetch, which adds latency and network traffic.- Removing
DENO_DIRclears all caches globally, affecting unrelated projects.
Questions
- Is there a supported workflow to scope cache invalidation to a single project or dependency tree?
- Can a lock file or integrity hash be used to trigger selective refresh without a full
--reload? - Are there plans to introduce configurable cache expiration or background validation in a future release?