I know cache invalidation is a hard problem 🥲. But, it's an annoying one.
When augmenting a musicbrainz release with a barcode and then trying to search for that barcode in Harmony, it returns
MusicBrainz: API returned no results: https://musicbrainz.org/ws/2/release?query=barcode%3A853567576415&fmt=json
At first the MB API returns {"created":"2026-05-10T02:25:10.167Z","count":0,"offset":0,"releases":[]}, however within minutes MusicBrainz API starts to return the correct data. Harmony in turn keeps thinking that the data doesn't change because it had cached that request somewhere and for hours there's no way to process a release.
There needs to be some kind of invalidation mechanism: manual button (force refresh), a background query to MusicBrainz with 304 not modified response, a very small expiration date on caches for the releases imported within minutes/hours from the current datetime (as changes are expected, so it is not useful to cache), etc. Maybe folks have some better ideas.
I know cache invalidation is a hard problem 🥲. But, it's an annoying one.
When augmenting a musicbrainz release with a barcode and then trying to search for that barcode in Harmony, it returns
At first the MB API returns
{"created":"2026-05-10T02:25:10.167Z","count":0,"offset":0,"releases":[]}, however within minutes MusicBrainz API starts to return the correct data. Harmony in turn keeps thinking that the data doesn't change because it had cached that request somewhere and for hours there's no way to process a release.There needs to be some kind of invalidation mechanism: manual button (force refresh), a background query to MusicBrainz with 304 not modified response, a very small expiration date on caches for the releases imported within minutes/hours from the current datetime (as changes are expected, so it is not useful to cache), etc. Maybe folks have some better ideas.