We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18f67f7 commit 953cca6Copy full SHA for 953cca6
src/ImageSharp.Web.Providers.Azure/Resolvers/AzureBlobStorageImageResolver.cs
@@ -37,10 +37,9 @@ public async Task<ImageMetadata> GetMetaDataAsync()
37
if (CacheControlHeaderValue.TryParse(properties.CacheControl, out CacheControlHeaderValue cacheControl))
38
{
39
// Weirdly passing null to TryParse returns true.
40
- TimeSpan sourceMaxAge = cacheControl?.MaxAge.GetValueOrDefault() ?? TimeSpan.Zero;
41
- if (sourceMaxAge != TimeSpan.Zero)
+ if (cacheControl != null)
42
43
- maxAge = sourceMaxAge;
+ maxAge = cacheControl.MaxAge.GetValueOrDefault();
44
}
45
46
0 commit comments