Maps > Using Load-On-Demand > Managing Errors and Load-on-Demand Events > Caching Tiles
 
Caching Tiles
The tile cache is the place where tiles whose lock counter has returned to 0 are stored. The tiles in the cache are eligible for unloading if memory is needed for loading new tiles.
The cache can be shared among several layers, which means that loading a tile in a layer can cause a tile to be unloaded in another layer.
The IlvDefaultTileCache class implements a cache algorithm consisting of a simple LRU (Least Recently Used) structure that unloads first the tiles that have been visited the least recently.
You can, however, implement another algorithm that will be more efficient with respect to the specific nature of your application. Here are a few criteria you might take into account when implementing a new cache algorithm.
*Unload first the tiles that require a larger number of pan or zoom operations to be reached from the current position.
*Unload first the tiles that have taken the longest to load.
*Unload first the tiles that contain the largest number of graphic objects.
An example of a simplified cache algorithm is given in the section Writing a New Cache Algorithm on page 101.

Version 6.3
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.