应用过滤器时,过滤后的图像会被缓存:
let filter = AspectScaledToFillSizeWithRoundedCornersFilter(
size: kSize,
radius: kRadius
)
myImageView.af_setImage(
withURL: imageUrl,
placeholderImage: placeholderImage,
filter: filter
)
但之后,当我请求NOT过滤图像(原始图像)时,它没有被缓存:
myImageView.af_setImage(
withURL: imageUrl,
placeholderImage: placeholderImage
)
在第一次调用中,下载原始图像,但仅缓存过滤后的图像。我希望在第一次调用中立即缓存过滤后的图像和原始图像。是否有可能优雅地做到这一点?谢谢!