public static async Task <DeviceScopeIdentitiesCache> Create(
            IServiceIdentityHierarchy serviceIdentityHierarchy,
            IServiceProxy serviceProxy,
            IKeyValueStore <string, string> encryptedStorage,
            TimeSpan refreshRate,
            TimeSpan refreshDelay,
            TimeSpan initializationRefreshDelay)
        {
            Preconditions.CheckNotNull(serviceProxy, nameof(serviceProxy));
            Preconditions.CheckNotNull(encryptedStorage, nameof(encryptedStorage));
            Preconditions.CheckNotNull(serviceIdentityHierarchy, nameof(serviceIdentityHierarchy));

            var identityStore = new ServiceIdentityStore(encryptedStorage);
            IDictionary <string, StoredServiceIdentity> cache = await identityStore.ReadCacheFromStore(encryptedStorage, serviceIdentityHierarchy.GetActorDeviceId());

            // Populate the serviceIdentityHierarchy
            foreach (KeyValuePair <string, StoredServiceIdentity> kvp in cache)
            {
                await kvp.Value.ServiceIdentity.ForEachAsync(serviceIdentity => serviceIdentityHierarchy.AddOrUpdate(serviceIdentity));
            }

            var deviceScopeIdentitiesCache = new DeviceScopeIdentitiesCache(serviceIdentityHierarchy, serviceProxy, identityStore, refreshRate, refreshDelay, initializationRefreshDelay, cache.Count > 0);

            Events.Created();
            return(deviceScopeIdentitiesCache);
        }