compose-imageloader icon indicating copy to clipboard operation
compose-imageloader copied to clipboard

how to reset disk cache

Open aplha98 opened this issue 1 year ago • 3 comments

aplha98 avatar Sep 12 '23 19:09 aplha98

DiskCache.clear() should do it.

val diskCache = DiskCache(FileSystem.SYSTEM) {
    //...
}
ImageLoader { 
    interceptor { 
        diskCache { diskCache }
    }
}
diskCache.clear()

qdsfdhvh avatar Sep 13 '23 01:09 qdsfdhvh

will this will effect and image loading in the app life time ImageLoader { interceptor { diskCache { diskCache } } } disk

aplha98 avatar Sep 15 '23 14:09 aplha98

I think it shouldn’t have effect, the exact implementation is in DiskLruCache, methods are all synchronized.

qdsfdhvh avatar Sep 17 '23 03:09 qdsfdhvh