Update ImageFileCache.cs

This commit is contained in:
ClemensFischer 2024-02-05 13:34:13 +01:00
parent 595b106c6b
commit 63c088e220

View file

@ -65,12 +65,12 @@ namespace MapControl.Caching
{
if (expiration.Value > DateTimeOffset.UtcNow)
{
var cacheOptions = new DistributedCacheEntryOptions
var options = new DistributedCacheEntryOptions
{
AbsoluteExpiration = expiration
};
memoryCache.Set(key, buffer, cacheOptions);
memoryCache.Set(key, buffer, options);
}
else
{
@ -109,12 +109,12 @@ namespace MapControl.Caching
{
if (expiration.Value > DateTimeOffset.UtcNow)
{
var cacheOptions = new DistributedCacheEntryOptions
var options = new DistributedCacheEntryOptions
{
AbsoluteExpiration = expiration
};
await memoryCache.SetAsync(key, buffer, cacheOptions, token).ConfigureAwait(false);
await memoryCache.SetAsync(key, buffer, options, token).ConfigureAwait(false);
}
else
{