I am using Coil Image loading library.
My Problem:
I am not getting image Url from backend, rather I am getting JPEG encoded String with its name / key.
What I was wondering is if there is any inbuilt support for caching bitmap
with respect to a key so that I can avoid asking for that encoded string every time I want to show that Image.
Is it possible? If not what might be the best way to solve my issue?
Thanks in advance.
Coil relies on OkHttp's disk cache which controls its own cache key which is based off the URL. However it's possible to set the memory cache key using RequestBuilder.key.
If you need to set the cache key for the data after it's been fetched, I don't think there's an inbuilt solution for that at the moment unfortunately.