Caching Modes


 

The TileLayer class supports the following caching modes:

Client-only caching

This mode is enabled when the EnableClientCache property is true and the TileCacheMode property is set to NoCache.

Tile images will be cached only by the client's web browser. This will free AspMap from generating the same images for the same client over and over.

This mode can be used if you do not want to store tile images on the server. This mode may improve the user's perception of performance (especially when panning a map), but tile images will be generated for each client.
 

Client-server dynamic caching

This mode is enabled when the EnableClientCache property is true, the TileCacheMode property is set to Dynamic and the TileCacheDirectory property is set to a tile cache directory.

Tile images generated by AspMap will be cached by the client's web browser and also will be stored in the tile cache directory. This way, the tile images from the tile cache directory will be available for all clients without the necessity to generate them for each client separately.

The maximum size of the tile cache directory is specified by MaxDynamicCacheSize property. When the size is exceeded, AspMap will remove some tiles and will store new tiles requested by clients.

In this mode AspMap will use static tiles generated by the GenerateTiles method (a static tile has the 's' prefix in the file name). Static tiles cannot be removed.
 

Client-server static caching

This mode is enabled when the EnableClientCache property is true, the TileCacheMode property is set to Static and the TileCacheDirectory property is set to a tile cache directory. The tile cache directory should contain pre-generated static tiles (a static tile has the 's' prefix in the file name) images. Static tiles can be generated by the GenerateTiles method for necessary zoom levels. If a tile is absent in the tile cache, AspMap will create and send it directly to the web browser.

This mode may be used if you do not want to store dynamically generated tiles on the server.
 

Desing-time caching

This mode simply disables map caching entirely by setting EnableClientCache property to false and the TileCacheMode property to NoCache. This is helpful when you develop your application and want to see the changes immediately.
 

 

© 2018 VDS Technologies
Converted from CHM to HTML with chm2web Standard 2.85 (unicode)