Cache
Class: Phaser.Cache
Constructor
new Cache(game)
Phaser has one single cache in which it stores all assets.
The cache is split up into sections, such as images, sounds, video, json, etc. All assets are stored using
a unique string-based key as their identifier. Assets stored in different areas of the cache can have the
same key, for example 'playerWalking' could be used as the key for both a sprite sheet and an audio file,
because they are unique data types.
The cache is automatically populated by the Phaser.Loader. When you use the loader to pull in external assets
such as images they are automatically placed into their respective cache. Most common Game Objects, such as
Sprites and Videos automatically query the cache to extract the assets they need on instantiation.
You can access the cache from within a State via