addTile(tile, data, type) {
            if (this._destroyed) {
                return;
            }
            $.console.assert(tile, '[CacheRecord.addTile] tile is required');

            // first come first served, data for existing tiles is NOT overridden
            if (data !== undefined && data !== null && this._tiles.length < 1) {
                // Since we IGNORE new data if already initialized, we support 'data getter'
                if (typeof data === 'function') {
                    data = data();
                }

                // in case we attempt to write to existing data object
                if (this.type && this._promise) {
                    if (data instanceof $.Promise) {
                        this._promise = data.then(d => {
                            this._overwriteData(d, type);
                        });
                    } else {
                        this._overwriteData(data, type);
                    }
                } else {
                    // If we receive async callback, we consume the async state
                    if (data instanceof $.Promise) {
                        this._promise = data.then(d => {
                            this._data = d;
                            this.loaded = true;
                            return d;
                        });
                        this._data = null;
                    } else {
                        this._promise = $.Promise.resolve(data);
                        this._data = data;
                        this.loaded = true;
                    }

                    this._type = type;
                }
                this._tiles.push(tile);
            } else {
                const tileExists = this._tiles.includes(tile);
                if (!tileExists && this.type && this._promise) {
                    // here really check we are loaded, since if optimization allows sending no data and we add tile without
                    // proper initialization it is a bug
                    this._tiles.push(tile);
                } else if (!tileExists) {
                    $.console.warn("Tile %s caching attempt without data argument on uninitialized cache entry!", tile);
                }
            }
        }
Add tile dependency on this record
@param tile
@param data can be null|undefined => optimization, will skip data initialization and just adds tile reference
@param type