Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

Your Answer


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.