many changes to support remote caching