Do not expire tiles from source tile caches that are still used by render tiles
This commit is contained in:
@@ -46,6 +46,19 @@ export function getKey(tileCoord) {
|
||||
return getKeyZXY(tileCoord[0], tileCoord[1], tileCoord[2]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the tile cache key for a tile key obtained through `tile.getKey()`.
|
||||
* @param {string} tileKey The tile key.
|
||||
* @return {string} The cache key.
|
||||
*/
|
||||
export function getCacheKeyForTileKey(tileKey) {
|
||||
const [z, x, y] = tileKey
|
||||
.substring(tileKey.lastIndexOf('/') + 1, tileKey.length)
|
||||
.split(',')
|
||||
.map(Number);
|
||||
return getKeyZXY(z, x, y);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a tile coord given a key.
|
||||
* @param {string} key The tile coord key.
|
||||
|
||||
Reference in New Issue
Block a user