feat(s3fs): cache immutable pack files on local disk to fix clone hangs
Serving a clone via upload-pack's delta-compression re-reads pack
objects thousands of times. Commit 76bb55d made pack reads lazy to
avoid RAM buffering; this causes each access to issue a fresh S3
GetObject, making real-repo clones never finish.
Implement PackCache: immutable pack-dir files (.pack/.idx/.rev)
download once to a local temp file (LRU-bounded by -pack-cache-bytes,
default 2GB) and all reads serve from local disk.
Results on real Tigris bucket:
- objgit (318 objects, 200KB pack): 8500+ GetObjects → 10, 7s
- kefka (197 commits, 19.6MB pack): hang → 14s, full clone
The cache is wired into OpenFile and shared across Chroot children
like the listing cache. Add flags: -pack-cache-bytes, -pack-cache-dir.
See docs/plans/pack-temp-file-cache.md for design.
Assisted-by: Claude Opus 4.8 via claude.ai
Signed-off-by: Xe Iaso <me@xeiaso.net>