mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-08 16:05:50 +00:00
Updated ImageLoader
This commit is contained in:
parent
7cdbca9c8c
commit
3c991d691b
3 changed files with 36 additions and 31 deletions
|
|
@ -201,12 +201,15 @@ namespace MapControl
|
|||
|
||||
if (buffer == null)
|
||||
{
|
||||
(buffer, var maxAge) = await ImageLoader.GetHttpResponseAsync(uri).ConfigureAwait(false);
|
||||
using var response = await ImageLoader.GetHttpResponseAsync(uri).ConfigureAwait(false);
|
||||
|
||||
if (buffer != null)
|
||||
if (response != null)
|
||||
{
|
||||
buffer = await response.Content.ReadAsByteArrayAsync().ConfigureAwait(false);
|
||||
|
||||
try
|
||||
{
|
||||
var maxAge = response.Headers.CacheControl?.MaxAge;
|
||||
var options = new DistributedCacheEntryOptions
|
||||
{
|
||||
AbsoluteExpirationRelativeToNow =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue