Classes
ImageCache
ImageCache
Represents a class that stores handles image download requests and caches the already downloaded images.
Summary 
Constructors
Properties
Methods
Constructors 
constructor 
new ImageCache(): ImageCache
 inherited from constructor
 Returns ImageCache
Properties 
maxRequests 
The maximum number of simultaneous download requests. Defaults to 5.
placeholder 
placeholder: ImageSource
The image to be used to notify for a pending download request - e.g. loading indicator.
downloadErrorEvent 
Static
String value used when hooking to download error event.
downloadedEvent 
Static
String value used when hooking to downloaded event.
Methods 
clear 
Removes all the previously cached images.
 Returns void
disableDownload 
Temporary disables download requests.
 Returns void
enableDownload 
Enables previously suspended download requests.
 Returns void
enqueue 
enqueue(request: DownloadRequest): any
Adds a new download request at the end of the download queue. This will be the last download to start.
 Returns any
get 
Gets the image for the specified key. May be undefined if the key is not present in the cache.
 Returns any
on 
on(eventNames: string, callback: (args: EventData) => void, thisArg?: any): void
A basic method signature to hook an event listener (shortcut alias to the addEventListener method).
 Returns void
on(event: "downloaded", callback: (args: DownloadedData) => void, thisArg?: any): void
Raised when the image has been downloaded.
 Returns void
on(event: "downloadError", callback: (args: DownloadError) => void, thisArg?: any): void
Raised if the image download errors.
 Returns void
push 
push(request: DownloadRequest): any
Adds a new download request at the top of the download queue. This will be the next immediate download to start.
 Returns any
remove 
Removes the cache for the specified key.
 Returns void
set 
Sets the image for the specified key.
 Returns void
- Previous
 - ImageAsset
 - Next
 - ImageSource