constructor(data, type, onDestroy) {
            this.tstamp = $.now();
            this._ondestroy = onDestroy;
            this._type = type;

            if (data instanceof $.Promise) {
                this._promise = data;
                data.then(data => {
                    this.loaded = true;
                    this._data = data;
                });
            } else {
                this._promise = null;
                this.loaded = true;
                this._data = data;
            }
        }
@class InternalCacheRecord
@memberof OpenSeadragon
@classdesc Simple cache record without robust support for async access. Meant for internal use only.

This class acts like the Maybe type:
 - it has 'loaded' flag indicating whether the tile data is ready
 - it has 'data' property that has value if loaded=true

This class supposes synchronous access, no collision of transform calls.
It also does not record tiles nor allows cache/tile sharing.
@private