phaser - v4.0.0-rc.4
    Preparing search index...

    The Cache Manager is the global cache owned and maintained by the Game instance.

    Various systems, such as the file Loader, rely on this cache in order to store the files it has loaded. The manager itself doesn't store any files, but instead owns multiple BaseCache instances, one per type of file. You can also add your own custom caches.

    Index

    Constructors

    Properties

    audio: BaseCache

    A Cache storing all non-streaming audio files, typically added via the Loader.

    binary: BaseCache

    A Cache storing all binary files, typically added via the Loader.

    bitmapFont: BaseCache

    A Cache storing all bitmap font data files, typically added via the Loader. Only the font data is stored in this cache, the textures are part of the Texture Manager.

    custom: { [key: string]: BaseCache }

    An object that contains your own custom BaseCache entries. Add to this via the addCustom method.

    game: Game

    A reference to the Phaser.Game instance that owns this CacheManager.

    html: BaseCache

    A Cache storing all html files, typically added via the Loader.

    json: BaseCache

    A Cache storing all JSON data files, typically added via the Loader.

    A Cache storing all WaveFront OBJ files, typically added via the Loader.

    physics: BaseCache

    A Cache storing all physics data files, typically added via the Loader.

    shader: BaseCache

    A Cache storing all shader source files, typically added via the Loader.

    text: BaseCache

    A Cache storing all text files, typically added via the Loader.

    tilemap: BaseCache

    A Cache storing all tilemap data files, typically added via the Loader. Only the data is stored in this cache, the textures are part of the Texture Manager.

    video: BaseCache

    A Cache storing all non-streaming video files, typically added via the Loader.

    A Cache storing all xml data files, typically added via the Loader.

    Methods

    • Add your own custom Cache for storing your own files. The cache will be available under Cache.custom.key. The cache will only be created if the key is not already in use.

      Parameters

      • key: string

        The unique key of your custom cache.

      Returns BaseCache

    • Removes all entries from all BaseCaches and destroys all custom caches.

      Returns void