Skip to main content

TileDataCache

A simple LRU cache for tile data. The cache is keyed by a string, which is typically a combination of the layer ID and tile coordinates.

Accessors​

stats​

Get Signature​

get stats(): TileCacheStats;
Returns​

TileCacheStats

Constructors​

Constructor​

new TileDataCache(maxBytes): TileDataCache;

Parameters​

ParameterType
maxBytesnumber

Returns​

TileDataCache

Methods​

clear()​

clear(): void;

Returns​

void


get()​

get(key): CachedTileData | undefined;

Parameters​

ParameterType
keystring

Returns​

CachedTileData | undefined


set()​

set(key, entry): void;

Parameters​

ParameterType
keystring
entryCachedTileData

Returns​

void

Properties​

maxBytes​

readonly maxBytes: number;