6

Is there a programmatic way to clear the cache of a map in ArcGIS Engine 10.0?

It is apparent that there is some caching scheme operating under the covers, and I'd like to clear all of its cached data. To be clear it isn't leaking memory, I just don't want it to be caching anything.

This is a fairly vanilla (*.mxd). Just a raster dataset, no basemap layers or anything fancy going on.

graph of memory

1 Answer 1

1

I think you want the IMapCooker2 Interface. It has two methods for clearing caches, Clear and ClearAll.

Clear clears the cache for a given layer within a given extent.

public void Clear (
    ILayer pLayer,
    IEnvelope pExtent
);

ClearAll on the other hand, clears cache for all layers.

public void ClearAll (
);
1
  • -1 According to the documentation, "The Interface IDynamicCacheLayerManager was written in order to manage the caches of proprietary dynamic display caches and it should not be used to manage MapServerLayers or rasters)" Commented Apr 24, 2012 at 18:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.