Two requests for the same missing artwork fetch it twice #349
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
/api/art on a cache miss fetches the image from its publisher, and a second request for the same URL meanwhile fetches it again. A page asks for ~50 at once, so a cold cache can fetch the same cover several times. Small: 61 misses in 7 days.
Fixed in
cb4ee5a: a per-address lock makes a second request for an image being fetched wait, then read it from the cache. Deployed.