crunchloop / crunchloop/devcontainer

feature/https: URL→digest cache index for true zero-network repeat fetches

未关闭
#9 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area/feature enhancement
主要语言
Go
星标
5
派生
0
平均合并
6 小时 17 分钟
30 天内合并 PR
15

描述

HTTPS feature cache today is content-addressed by sha256 of the body. To compute the digest we re-download the tarball on every `Fetch` call; only the **extract** step is cached (skipped if `/https/sha256-/extracted/devcontainer-feature.json` exists).

### Plan

Add an `/https/index.json` mapping `URL → {digest, fetchedAt, ttl}`. On Fetch, look up by URL first, validate the cached digest's extracted dir, and skip the download entirely on hit. Honor a default TTL (e.g. 24h) so we still re-pull occasionally for security; configurable via `DiskStoreOptions.HTTPSCacheTTL`.

### Why

For DAP-style hot paths and CI, network round-trips on cached features are wasted seconds. Documented limitation in design/features.md §8 / current code in feature/https.go.

贡献指南

打开贡献指南

调研方向

Start with feature/https.go and read design/features.md §8 to understand the existing content-addressed cache and extract-directory validation. Trace the Fetch path and DiskStoreOptions, then define tests for URL-index hits, TTL expiry, and invalid extracted directories; done means repeat fetches avoid the network while expired entries re-pull.

由索引模型根据 Issue 内容生成。

评估

技术栈
go
领域
devtools, networking
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。