Class: TileCache

OpenSeadragon.TileCache

Stores all the tiles displayed in a OpenSeadragon.Viewer. You generally won't have to interact with the TileCache directly.

Constructor

new TileCache(options)

Parameters:
Name Type Description
options Object Configuration for this TileCache.
Properties
Name Type Attributes Description
maxImageCacheCount Number <optional>
See maxImageCacheCount in OpenSeadragon.Options for details.
Source:

Methods

clear(withZombies)

Delete all data in the cache
Parameters:
Name Type Default Description
withZombies boolean true
Source:

clearDrawerInternalCache(drawer)

Clean up internal drawer data for a given drawer
Parameters:
Name Type Description
drawer OpenSeadragon.DrawerBase
Source:

clearTilesFor(tiledImage)

Clears all tiles associated with the specified tiledImage.
Parameters:
Name Type Description
tiledImage OpenSeadragon.TiledImage
Source:

getCacheRecord(cacheKey) → {OpenSeadragon.CacheRecord|undefined}

Get cache record (might be a unattached record, i.e. a zombie)
Parameters:
Name Type Description
cacheKey
Source:
Returns:
Type
OpenSeadragon.CacheRecord | undefined

getLoadedTilesFor(tiledImage)

Returns reference to all tiles loaded by a particular tiled image item
Parameters:
Name Type Description
tiledImage OpenSeadragon.TiledImage | null if null, gets all tiles, else filters out tiles that belong to a specific image
Source:

numCachesLoaded() → {Number}

Source:
Returns:
The total number of cached objects (+ zombies)
Type
Number

numTilesLoaded() → {Number}

Source:
Returns:
The total number of tiles that have been loaded by this TileCache. Note that the tile might be recorded here mutliple times, once for each cache it uses.
Type
Number

safeUnloadCache(cache)

Delete cache safely from the system if it is not needed
Parameters:
Name Type Description
cache OpenSeadragon.CacheRecord
Source:

unloadTile(tile, destroy)

Unload tile: this will free the tile data and mark the tile as unloaded.
Parameters:
Name Type Default Description
tile OpenSeadragon.Tile
destroy boolean false if set to true, tile data is not preserved as zombies but deleted immediatelly
Source: