I'm monitoring my web calls with Charles.
I have a GlideModule changing cache folder by overriding applyOption(...) like this :
@Override
public void applyOptions(Context context, GlideBuilder builder) {
builder.setDiskCache(
new InternalCacheDiskCacheFactory(context, "/media/", 1500000)
);
}
Then, I do my Glide images loads and the cache works just fine while I'm in the app. Here is an example :
Glide.with(this)
.load("http://www.wired.com/wp-content/uploads/2015/09/google-logo.jpg")
.into(mImageView);
Only the first call make a web call and then it use cache to retrieve it. However, if I kill the app then relaunch it, instead of continuing to use the cache, the app make a new web call. Isn't the cache supposed to be persistent inside the Internal storage ?