From ab1b1dcffad29334a8c3b279bfc8621e177543fe Mon Sep 17 00:00:00 2001
From: Psychotoxical <171614930+Psychotoxical@users.noreply.github.com>
Date: Sun, 26 Apr 2026 01:32:17 +0200
Subject: [PATCH] fix(imageCache): give every cached
its own object URL
The previous design kept a single global Map with an
LRU cap of 150 and aggressively revoked the oldest URL on overflow. On
libraries with more than 150 cached covers (artist + album grids quickly
exceed that), an in-use URL would get revoked because a different
consumer pushed it out of the cache, producing the "Failed to load
resource: blob:..." flood that several users have reported.
Refactor the cache to be blob-centric:
- Public API is now getCachedBlob() returning the Blob itself.
- In-memory LRU now holds Blobs (cap 200), not URLs. Map-entry eviction
drops the strong reference and lets the GC free the Blob once no
consumer (object URL,
,