翠鸟缓存图像到磁盘

dug*_*hou 2 uikit ios kingfisher

for url in status.storedPicURLS! {
            group.enter()
            print("\(status.storedPicURLS)")
            KingfisherManager.shared.downloader.downloadImage(with: url, options: nil, progressBlock: nil, completionHandler: { (image, _, _, _) in
                print(" \(image)")
                group.leave()
            })
        }
    }
    group.notify(queue: .main) {
        finished(list, nil)
    }
Run Code Online (Sandbox Code Playgroud)

我可以在控制台中获取图像,但我无法在缓存中找到它们.

/Library/Developer/CoreSimulator/Devices/7AF33AA9-220E-4B54-9830-  AA94226C16E8/data/Containers/Data/Application/451F885E-1DFF-4E57-A0D7-B3DEC880DF8F/Library/Caches/
Run Code Online (Sandbox Code Playgroud)

图像描述在这里

one*_*cat 10

downloader(ImageDownloader)与缓存无关.如果要下载和缓存(以及稍后检索缓存的图像),则应使用manager方法:KingfisherManager.shared.retrieveImage而不是单独下载.