Store Image with Disk Cache Locally #1508
IsaacTrevino
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible to store local images via Disk Cache? For example, If I have a URI or Bitmap, could I load the image using the request builder and retrieve the
diskCacheKey
? I have only gotten this to work withmemoryCacheKey
or when the DataSource is from an HTTP (e.g. URL).My objective is to store images I have taken with the camera in the disk cache while offline. It appears that only the memory cache can only do that, whereas the disk cache only works with remote online sources.
My current implementation:
Request:
Perhaps it would be easier if I used the android native
ContentProvider
for my task, though disk caching seems to be the most ideal approach. And Glide seems to have complicated documentation. Thought I'd give Coil a try before looking for alternatives.https://developer.android.com/topic/performance/graphics/cache-bitmap#disk-cache
Beta Was this translation helpful? Give feedback.
All reactions