public async Task LoadFromProviderAsync(IKeyValueSource <V> provider, bool flush = true) { Contract.NotNull(provider, nameof(provider)); if (flush && !this.cacheProvider.SupportsFlushing) { throw new NotSupportedException("The provider does not support flushing the cache"); } var items = await provider.GetAllAsync(); await this.cacheProvider.SetAsync(items, flush : flush); }