Skip to content

Commit

Permalink
Pass processIdentifier when checking cache in ImagePrefetcher
Browse files Browse the repository at this point in the history
Without this parameter, ImagePrefetcher will have a cache miss whenever a user passes any ImageProcessor other than DefaultImageProcessor, regardless of whether that image has already been downloaded
  • Loading branch information
Killectro committed Feb 9, 2017
1 parent ca02c9b commit 5d6fd33
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/ImagePrefetcher.swift
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,9 @@ public class ImagePrefetcher {
if optionsInfo.forceRefresh {
downloadAndCache(resource)
} else {
let alreadyInCache = manager.cache.isImageCached(forKey: resource.cacheKey).cached
let alreadyInCache = manager.cache.isImageCached(forKey: resource.cacheKey,
processorIdentifier: optionsInfo.processor.identifier).cached

if alreadyInCache {
append(cached: resource)
} else {
Expand Down

0 comments on commit 5d6fd33

Please sign in to comment.