Keep cached sources and variants in one FileStore type (closes #318) #335

Merged
clawbot merged 1 commits from issue-318-one-file-store into next 2026-10-26 20:24:34 +01:00
1 Commits
Author SHA1 Message Date
sneak e0539a8601 Keep cached sources and variants in one FileStore type (closes #318)
check / check (push) Canceled after 0s
imgcache.FileStore is a directory of files named by a hex key, at
<ab>/<cd>/<key>. It writes a file under a temp name, syncs it and renames
it into place. It opens, reports the size of and deletes the file for a
key. The cache keeps its sources in one FileStore and its variants in
another, so ContentStorage and VariantStorage are gone. FileStore has no
Exists: the reconciliation pass checks a variant's file with Size, and the
tests look for the file on disk. Cache.Variant reads the content type from
the file's first bytes itself. storage.go is now filestore.go, and the
unused testdata/red.avif is gone.

Model: opus-5-5
2026-10-26 19:13:04 +00:00