in Core/src/Impl/Storages/AwsS3Storage.cs [266:286]
public async Task InvalidateExternalServicesAsync(IEnumerable<SymbolStoragePath>? fileMasks = null)
{
if (!string.IsNullOrEmpty(myCloudFrontDistributionId))
{
var items = fileMasks != null
? fileMasks.Select(x => "/" + SymbolPathToAwsKey(x)).ToList()
: new List<string> { "/*" };
if (items.Count > 0)
{
await myCloudFrontClient.CreateInvalidationAsync(new CreateInvalidationRequest
{
DistributionId = myCloudFrontDistributionId,
InvalidationBatch = new InvalidationBatch(new Paths
{
Items = items,
Quantity = items.Count
}, $"symbol-storage-{DateTime.UtcNow:s}")
});
}
}
}