|
@@ -474,19 +474,19 @@ open class ImageCache {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- let finalImage = options.imageModifier?.modify(image) ?? image
|
|
|
|
|
// Cache the disk image to memory.
|
|
// Cache the disk image to memory.
|
|
|
// We are passing `false` to `toDisk`, the memory cache does not change
|
|
// We are passing `false` to `toDisk`, the memory cache does not change
|
|
|
// callback queue, we can call `completionHandler` without another dispatch.
|
|
// callback queue, we can call `completionHandler` without another dispatch.
|
|
|
var cacheOptions = options
|
|
var cacheOptions = options
|
|
|
cacheOptions.callbackQueue = .untouch
|
|
cacheOptions.callbackQueue = .untouch
|
|
|
self.store(
|
|
self.store(
|
|
|
- finalImage,
|
|
|
|
|
|
|
+ image,
|
|
|
forKey: key,
|
|
forKey: key,
|
|
|
options: cacheOptions,
|
|
options: cacheOptions,
|
|
|
toDisk: false)
|
|
toDisk: false)
|
|
|
{
|
|
{
|
|
|
_ in
|
|
_ in
|
|
|
|
|
+ let finalImage = options.imageModifier?.modify(image) ?? image
|
|
|
callbackQueue.execute { completionHandler(.success(.disk(finalImage))) }
|
|
callbackQueue.execute { completionHandler(.success(.disk(finalImage))) }
|
|
|
}
|
|
}
|
|
|
case .failure(let error):
|
|
case .failure(let error):
|