Nuke Documentation

Structure Image​Request.​Options

public struct Options: OptionSet, Hashable  

Image request options.

ImageRequest.Options ImageRequest.Options OptionSet OptionSet ImageRequest.Options->OptionSet Hashable Hashable ImageRequest.Options->Hashable

Member Of

ImageRequest

Represents an image request.

Conforms To

Hashable
OptionSet

Initializers

init(raw​Value:​)

public init(rawValue: UInt16)  

Initialializes options with a given raw values.

Properties

raw​Value

public let rawValue: UInt16

Returns a raw value.

disable​Memory​Cache​Reads

public static let disableMemoryCacheReads  

Disables memory cache reads (ImageCaching).

disable​Memory​Cache​Writes

public static let disableMemoryCacheWrites  

Disables memory cache writes (ImageCaching).

disable​Memory​Cache

public static let disableMemoryCache: Options = [.disableMemoryCacheReads, .disableMemoryCacheWrites] 

Disables both memory cache reads and writes (ImageCaching).

disable​Disk​Cache​Reads

public static let disableDiskCacheReads  

Disables disk cache reads (DataCaching).

disable​Disk​Cache​Writes

public static let disableDiskCacheWrites  

Disables disk cache writes (DataCaching).

disable​Disk​Cache

public static let disableDiskCache: Options = [.disableDiskCacheReads, .disableDiskCacheWrites] 

Disables both disk cache reads and writes (DataCaching).

reload​Ignoring​Cached​Data

public static let reloadIgnoringCachedData: Options = [.disableMemoryCacheReads, .disableDiskCacheReads] 

The image should be loaded only from the originating source.

This option only works ImageCaching and DataCaching, but not URLCache. If you want to ignore URLCache, initialize the request with URLRequest with the respective policy

return​Cache​Data​Dont​Load

public static let returnCacheDataDontLoad  

Use existing cache data and fail if no cached data is available.