A single Cache for all assets.
Example
import { Cache } from 'pixi.js';
Cache.set('bunny', bunnyTexture);
Members
parsers CacheParser[]
All loader parsers registered
Methods
Fetch entry by key
Name | Type | Description |
---|---|---|
key |
any |
The key of the entry to get |
Returns:
Type | Description |
---|---|
T |
Check if the key exists
Name | Type | Description |
---|---|---|
key |
any |
The key to check |
Returns:
Type | Description |
---|---|
boolean |
Remove entry by key
This function will also remove any associated alias from the cache also.
Name | Type | Description |
---|---|---|
key |
any |
The key of the entry to remove |
Clear all entries.
Set a value by key or keys name
Name | Type | Description |
---|---|---|
key |
any | any[] |
The key or keys to set |
value |
unknown |
The value to store in the cache or from which cacheable assets will be derived. |