Loading images into cache
storages | Pass the image storage name you want to cache as an array (Object of Array class). |
limitbytes | Specifies the cache capacity limit to use in calling this method, in bytes. |
timeout | Specifies the timeout (time limit) in ms. If you specify 0, there is no limit. |
This method attempts to cache the specified image.
However, while this method attempts to cache the image, there is no guarantee that the image will actually be cached.
If the image cache limit is exceeded or a timeout occurs, image loading will be interrupted.
The image specified in the storages argument is more likely to be cached (priority is given) as it is written first.
If the specified image is already in the cache, it just raises the rank of survival in the cache.
This method ignores any errors during image loading.
In the current version, the images that can be cached with this method are usually images that can be loaded by Layer.loadImages and do not specify a color key (images with an alpha channel are fine).
Universal transition rule images and area images will be read, but they will not be valid data as a cache (the read data will be wasted), so do not specify them.
See System.graphicCacheLimit for the number of bytes an image uses in the cache.