qdsfdhvh / compose-imageloader

Compose Image library for Kotlin Multiplatform.
https://qdsfdhvh.github.io/compose-imageloader/
MIT License
441 stars 15 forks source link

how to reset disk cache #292

Open aplha98 opened 1 year ago

qdsfdhvh commented 1 year ago

DiskCache.clear() should do it.

val diskCache = DiskCache(FileSystem.SYSTEM) {
    //...
}
ImageLoader { 
    interceptor { 
        diskCache { diskCache }
    }
}
diskCache.clear()
aplha98 commented 1 year ago

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

qdsfdhvh commented 1 year ago

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