cache scope tree, fix issue with cache invalidation