7

Is it possible to keep a reference to the loaded image into cache (on disk) and reuse it later in Glide 4?

Let's say I want to load an image like this:

Future<Bitmap> future = Glide.with(context).asBitmap().load(resourceId).submit(300, 200);

I want to save new processed bitmap to disk. Should I use diskCacheStrategy(DiskCacheStrategy.AUTOMATIC)?

Then in the next activity I want to reuse this new bitmap from disk cache. How can I do it? Should I use signature as a reference to access this bitmap?

Alex
  • 11,451
  • 6
  • 37
  • 52

0 Answers0