mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 22:46:58 +00:00
Update ImageFileCache.cs
This commit is contained in:
parent
547fa394e2
commit
595b106c6b
1 changed files with 12 additions and 2 deletions
|
|
@ -65,7 +65,12 @@ namespace MapControl.Caching
|
|||
{
|
||||
if (expiration.Value > DateTimeOffset.UtcNow)
|
||||
{
|
||||
memoryCache.Set(key, buffer, new DistributedCacheEntryOptions { AbsoluteExpiration = expiration });
|
||||
var cacheOptions = new DistributedCacheEntryOptions
|
||||
{
|
||||
AbsoluteExpiration = expiration
|
||||
};
|
||||
|
||||
memoryCache.Set(key, buffer, cacheOptions);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -104,7 +109,12 @@ namespace MapControl.Caching
|
|||
{
|
||||
if (expiration.Value > DateTimeOffset.UtcNow)
|
||||
{
|
||||
await memoryCache.SetAsync(key, buffer, new DistributedCacheEntryOptions { AbsoluteExpiration = expiration }, token).ConfigureAwait(false);
|
||||
var cacheOptions = new DistributedCacheEntryOptions
|
||||
{
|
||||
AbsoluteExpiration = expiration
|
||||
};
|
||||
|
||||
await memoryCache.SetAsync(key, buffer, cacheOptions, token).ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue