How do get the path of destination where image is saved using Glide (Image loading library Android) -
glide uses disk caching (both internal , external). way stores file name encoded in format. possible original file name/file path, image downloaded ?
glide uses two-level cache in 3.x: source , result. default caching (if don't specify .diskcachestrategy() result. there's no public way figure out file corresponds normal glide load (result cache).
the main article caching is: https://github.com/bumptech/glide/wiki/caching-and-cache-invalidation
many have tried to mess with the cache.
the solution based on use case , can choose 1 of:
.sigunature(): invalidate single item in cache when signature changes.downloadonly(): file handle source cache item.asbytes(): returns jpg/png encodedbyte[]instead of drawable/bitmapglide.get(context).cleardiskcache(): last resort only, removes everything
Comments
Post a Comment