use of com.bumptech.glide.load.engine.cache.DiskCache in project glide by bumptech.
the class ExternallyClearedDiskCacheTest method clearDiskCache_afterOpeningDiskCache_andDeleteDirectoryOutsideGlide_doesNotThrow.
@Test
public void clearDiskCache_afterOpeningDiskCache_andDeleteDirectoryOutsideGlide_doesNotThrow() {
DiskCache cache = DiskLruCacheWrapper.create(cacheDir, 1024 * 1024);
cache.get(mock(Key.class));
deleteRecursively(cacheDir);
cache.clear();
}
use of com.bumptech.glide.load.engine.cache.DiskCache in project fresco by facebook.
the class SampleGlideModule method applyOptions.
@Override
public void applyOptions(final Context context, GlideBuilder builder) {
builder.setDiskCache(new DiskCache.Factory() {
@Override
public DiskCache build() {
return DiskLruCacheWrapper.get(Glide.getPhotoCacheDir(context), ConfigConstants.MAX_DISK_CACHE_SIZE);
}
});
builder.setMemoryCache(new LruResourceCache(ConfigConstants.MAX_MEMORY_CACHE_SIZE));
}
Aggregations