Skip to content

Custom cache layer for cover art which ignores (pre-signed URL) query parameters (#133)

I believe this resolves #133 (closed).

When using a Funkwhale instance which serves cover art directly from remote (S3) storage with pre-signed URLs, the (ephemeral) credentials can cause problems with Picasso/OkHttp caching. This adds a really simple image cache layer which disregards those credentials for the purposes of generating a cache key. Basically: you fetch it once with valid credentials, and then shouldn't have to fetch it again until you clear your cache, no matter how the credentials change. In theory, this can lead to unbounded cache growth, but as cover art is finite ... meh?

But also: I haven't done any serious Android development in a decade, nor any significant Kotlin. I could use a second set of eyes from someone who understands both, because I'm not sure I have considered all the esoteric Android lifecycle implications, nor if I have used the correct Kotlin idioms to ensure I haven't left anything dangling.

Merge request reports