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
Constructors
Constructor
new TileDataCache(maxBytes): TileDataCache;
Parameters
| Parameter | Type |
|---|---|
maxBytes | number |
Returns
TileDataCache
Methods
clear()
clear(): void;
Returns
void
get()
get(key): CachedTileData | undefined;
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
CachedTileData | undefined
set()
set(key, entry): void;
Parameters
| Parameter | Type |
|---|---|
key | string |
entry | CachedTileData |
Returns
void
Properties
maxBytes
readonly maxBytes: number;