Gets the cache name for a given layer within a map (data frame).
GetCacheName(string MapName, int LayerID)
Parameter |
Description |
MapName |
Name of the map (data frame) on which a cache was created.
|
LayerID |
The layer id of the layer in the map on which a cache was created. A multilayer cache can have one cache name for each layer. To get the name of a fused cache, specify a value of -1.
|
Return Value
A string containing the cache name for the layer specified. If working with a fused cache, the layer id is -1 and the cache name "_alllayers" will be returned.
Remarks
To determine if you are working with a multilayer or fused cache, use the methods HasLayerCache() or HasSingleFusedCache() on the map service proxy. Note that a map service with a multilayer cache may have a cache generated on some layers and not others.
Examples