rasmuslos / ShelfPlayer

Native Audiobookshelf player for iOS & iPadOS
Other
148 stars 15 forks source link

[Feature Request] Cache cover art. #25

Closed tehguitarist closed 5 months ago

tehguitarist commented 5 months ago

Very low priority feature request, but I noticed that the app seems to be loading all the cover art each time I close/open the app. Not a huge deal, but I assume this would because it's downloading it each time rather than loading from a cache.

I suppose the natural progression would of course be the ability purge that cache.

If it is in fact just lazy loading from a cache already, all good!

gh0sti commented 5 months ago

Before recent updates covers were 400x400 when loading the app which made it fast. That was Changed to load full image from the server. So I wonder if we can get some type of cache or a similar way apple does photos in the photo app where it's a stub compressed image until it's loaded to full size.

rasmuslos commented 5 months ago

Before recent updates covers were 400x400 when loading the app which made it fast. That was Changed to load full image from the server. So I wonder if we can get some type of cache or a similar way apple does photos in the photo app where it's a stub compressed image until it's loaded to full size.

This is possible, yes but in the end I don't think it is necessary. Nuke is already used for image caching, but only until the app closes. It is possible to configure a disk, rather then a memory cache, I will do this in the near future.

rasmuslos commented 5 months ago

Apparently Nuke uses the build in URLCache by default, which determines caching duration by using the HTTP headers sent by the server. But because ABS does not send any cache headers no caching happens.