| Programming with JViews Maps > Creating a Map Application Using the API > Using Load-on-Demand > Caching Tiles |
Caching Tiles |
INDEX
PREVIOUS
NEXT
|
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 that 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.
An example of a simplified cache algorithm is given in Writing a New Cache Algorithm.
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. Legal terms. | PREVIOUS NEXT |