Merge pull request #10254 from wangjohn/refactoring_local_cache

Refactored the storage of a temporary version of the local cache.