Phaser API Documentation

  Version: 
add(key, data)

Description:

Adds an item to this cache. The item is referenced by a unique string, which you are responsible for setting and keeping track of. The item can only be retrieved by using this string.

Parameters:

name type description
key string

The unique key by which the data added to the cache will be referenced.

data *

The data to be stored in the cache.

Returns:
Description:

This BaseCache object.

Since: 3.0.0
Source: src/cache/BaseCache.js (Line 52)