public uncache()

in src/component/spatial/SpatialCache.ts [203:251]


    public uncache(keepCellIds?: string[]): void {
        for (let cellId of Object.keys(this._cacheRequests)) {
            if (!!keepCellIds && keepCellIds.indexOf(cellId) !== -1) {
                continue;
            }

            for (const aborter of this._cacheRequests[cellId]) {
                aborter();
            }

            delete this._cacheRequests[cellId];
        }

        for (let cellId of Object.keys(this._cellClusters)) {
            if (!!keepCellIds && keepCellIds.indexOf(cellId) !== -1) {
                continue;
            }

            for (const cd of this._cellClusters[cellId]) {
                if (!(cd.key in this._clusterCells)) {
                    continue;
                }

                const index: number = this._clusterCells[cd.key].indexOf(cellId);
                if (index === -1) {
                    continue;
                }

                this._clusterCells[cd.key].splice(index, 1);

                if (this._clusterCells[cd.key].length > 0) {
                    continue;
                }

                delete this._clusterCells[cd.key];
                delete this._clusters[cd.key];
            }

            delete this._cellClusters[cellId];
        }

        for (let cellId of Object.keys(this._cells)) {
            if (!!keepCellIds && keepCellIds.indexOf(cellId) !== -1) {
                continue;
            }

            delete this._cells[cellId];
        }
    }