public async Task UpdatePackageBlobPropertiesAsync(PackageValidationSet validationSet) { var fileName = BuildFileName( validationSet, _fileMetadataService.FileSavePathTemplate, _fileMetadataService.FileExtension); // This will throw if the ETag changes between read and write operations. await _fileStorageService.SetPropertiesAsync( _fileMetadataService.FileFolderName, fileName, async (lazyStream, blobProperties) => { // Update the cache control only if the cache control is not the same as the default value. if (!string.Equals(blobProperties.CacheControl, CoreConstants.DefaultCacheControl, StringComparison.OrdinalIgnoreCase)) { blobProperties.CacheControl = CoreConstants.DefaultCacheControl; return(await Task.FromResult(true)); } return(await Task.FromResult(false)); }); }