Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer 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 (
);
share|improve this answer
    
-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)" –  Kirk Kuykendall Apr 24 '12 at 18:44
    
Fixed. Thanks for catching that error. –  R.K. Sep 12 '12 at 16:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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