Advanced
Static
getStatic
hasCheck if the key exists
The key to check
Static
removeRemove entry by key
This function will also remove any associated alias from the cache also.
The key of the entry to remove
Static
resetClear all entries.
Static
setSet a value by key or keys name
The key or keys to set
The value to store in the cache or from which cacheable assets will be derived.
A global cache for all assets in your PixiJS application. The cache system provides fast access to loaded assets and prevents duplicate loading.
Key Features:
You typically do not need to use this class directly. Use the main Assets class for high-level asset management.
Assets.get(key)
will automatically use the cache.Example
Remarks
The Cache is a core component of PixiJS' asset management system:
This is a singleton class and should not be instantiated directly. Use the exported
Cache
instance instead.See