public protocol Resource
Represents an image resource at a certain url and a given cache key.
Kingfisher will use a
Resource to download a resource from network and cache it with the cache key when
Source.network as its image setting source.
Types Conforming to
ImageResource is a simple combination of
cacheKey. When passed to image view set methods, Kingfisher will try to download the target image from the
downloadURL, and then store it with the
cacheKeyas the key in cache.
public func convertToSource(overrideCacheKey: String? = nil) -> Source
self to a valid
Source based on its
downloadURL scheme. A
LocalFileImageDataProvider associated will be returned if the URL points to a local file. Otherwise,
.network is returned.
var cacheKey: String
The key used in cache.
var downloadURL: URL
The target image URL.