Use AbsoluteExpirationRelativeToNow

This commit is contained in:
ClemensFischer 2024-02-04 09:13:12 +01:00
parent f14d198818
commit 7f7763ad40
3 changed files with 4 additions and 4 deletions

View file

@ -172,13 +172,13 @@ namespace MapControl
var cacheOptions = new DistributedCacheEntryOptions
{
AbsoluteExpiration = DateTimeOffset.UtcNow.Add(maxAge)
AbsoluteExpirationRelativeToNow = maxAge
};
await Cache.SetAsync(cacheKey, buffer, cacheOptions).ConfigureAwait(false);
}
}
//else System.Diagnostics.Debug.WriteLine($"Cached: {cacheKey}");
//else System.Diagnostics.Debug.WriteLine($"Cached: {cacheKey} - {buffer.Length} bytes");
if (buffer != null && buffer.Length > 0)
{