Serve a cached variant while its source URL is negative-cached (closes #245)

Get checked the negative cache before it looked for the variant on
disk, so after one failed fetch of a source every cached variant of it
answered 502 for 5 minutes. Get now serves a cached variant first and
checks the negative cache only on a miss, before processing. The 502
line under /v1/image/ in README.md and TODO.md say so.

Model: opus-5-5
This commit is contained in:
2026-10-15 08:10:25 +00:00
parent 31f2b6ea55
commit ef32da807e
3 changed files with 27 additions and 17 deletions
+7
View File
@@ -38,6 +38,13 @@ 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 variant is served while its source URL is in the negative
cache (closes #245): `Get` checked the negative cache before the variant
cache, so once a fetch of the source failed, as one does when another variant
misses after the source was evicted and the upstream is down, every cached
variant of that source answered 502 for 5 minutes. `Get` now serves a cached
variant first and checks the negative cache only on a miss, before processing.
`README.md` says so under `/v1/image/`.
- 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