Home » Android » java – Difference DiskCacheStrategy in Glide v4

java – Difference DiskCacheStrategy in Glide v4

Posted by: admin April 23, 2020 Leave a comment


I am using Glide 4.1.1 in one of my android application. I am using it with below code and not facing any issue in application.

                .apply(new RequestOptions()

I have doubt in .diskCacheStrategy(DiskCacheStrategy.ALL) Option. There total five type option located with this like below


I have tried to find its documentation but not able to find difference between this. Let me know if someone have used it and have idea what is difference between this all and when should we use it.

How to&Answers:
  • Glide 3.x & 4.x: DiskCacheStrategy.NONE caches nothing
  • Glide 4.x: DiskCacheStrategy.DATA, Glide 3.x:
    DiskCacheStrategy.SOURCE caches only the original full-resolution
  • Glide 4.x: DiskCacheStrategy.RESOURCE Glide 3.x:
    DiskCacheStrategy.RESULT caches only the final image, after reducing
    the resolution (and possibly transformations) (default behavior of
    Glide 3.x)
  • Glide 4.x only: DiskCacheStrategy.AUTOMATIC intelligently chooses a
    cache strategy based on the resource (default behavior of Glide 4.x)
  • Glide 3.x & 4.x: DiskCacheStrategy.ALL caches all versions of the

Further Read this