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 encoded byte[] instead of drawable/bitmap
  • glide.get(context).cleardiskcache(): last resort only, removes everything

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -