The ArcGIS Javascript API has a nice refresh interface for ArcGISDynamicMapServiceLayer:
var dynamicMapServiceLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer");
map.addLayer(dynamicMapServiceLayer);
dynamicMapServiceLayer.setDisableClientCaching(true);
if (dynamicMapServiceLayer.disableClientCaching) {
aspect.after(dynamicMapServiceLayer, "onUpdateEnd", function () {
$.delay(15000, "UpdateDynamicLayer", function () {
dynamicMapServiceLayer.refresh();
});
});
}
But this is not generalized across the other layer types. Anyone have a solution for refreshing layers of any type?
UPDATE: This issue is resolved. Refresh support is implemented on DynamicMapServiceLayer so that actually handles every layer type I am interested in (no need to refresh tiles).