Open nikitahummus opened 1 year ago
i have tried but not useful @nikitahummus
I also moved the creation of Uuid() to the final variable and use the same object inside CacheObject when creating the path of it. And I did the same with the CacheManager in CachedNetworkImage, created CacheManager in static property of class with an image widget and use it without creating a new one each time.
it helped @zhancheng
🐛 Bug Report
Scheduled file cleanup on CachedNetworkImage throws
FileSystemException: Cannot delete file
. Issue After research, it turned out that different images are recorded along the same path. This happens because relativePath encoding uses Uuid().v1() , which uses DateTime.now() , which causes our error when loading a lot of files at the same time.To solve this problem, changing the path encoding in _flutter_cache_manager-3.3.0/lib/src/cachemanager.dart
putFile
andputFileStream
should help. for example, change v1 to v4, which uses a more random encoding