add scopeCache
scopeRender now uses the cache
add clearCache
addLayersFromFile invalidates the cache