improve reliability of scope caching
Merge remote-tracking branch 'origin/caching' into caching