Check cached file sizes at startup, not per request (closes #252)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
Lookup and LookupSource are as on next again: requests compare no sizes and a hit reads no extra row. The reconciliation pass, at startup and every five minutes, compares each cached source and variant file with the size its row records and removes one that is empty or of another size, with its rows and a warning naming the file; an empty variant file without a row is removed rather than adopted. Source, variant and .meta files all go through writeFileSynced (temp file, sync, rename, directory sync), the .meta file before the variant, and a failed directory sync removes the renamed file. #252 Model: opus-5-5
This commit is contained in:
@@ -38,6 +38,18 @@ P2: security: per-origin rate limiting
|
||||
and the query now have each `%` written as `%25` and each `:` as `%3A`; a path
|
||||
and query holding neither are signed and keyed as before. Signature
|
||||
Specification in `README.md` says so.
|
||||
- 2026-10-15 a cached file left empty or partial is no longer served, or fetched
|
||||
again on every request (closes #252). Source and transformed image files, and
|
||||
each transformed image's `.meta` file, are synced to disk before they are
|
||||
renamed into place, and their directory after; the `.meta` file is written
|
||||
before the image, and a failed directory sync removes the renamed file. The
|
||||
reconciliation pass, at startup and every five minutes, removes a cached
|
||||
source or transformed image whose file is empty, or not the size the database
|
||||
records for it, with its rows and a warning naming the file, so the next
|
||||
request fetches the source or converts the image again; requests compare no
|
||||
sizes. Storing a source over a file of another size replaces that file. A
|
||||
source that fails to decode is not removed for that alone: a damaged upstream
|
||||
image would then be fetched on every request.
|
||||
- 2026-10-15 the example config allowlists no host (closes #249): it allowlisted
|
||||
`github.com` and `user-images.githubusercontent.com`, where anyone can put an
|
||||
image, so a deployment set up as Getting Started says served those images to
|
||||
|
||||
Reference in New Issue
Block a user