From 085a9b6181f143836e224ed82cb817d6661b6b62 Mon Sep 17 00:00:00 2001 From: ClemensFischer Date: Tue, 18 Feb 2025 17:22:14 +0100 Subject: [PATCH] Update TileImageLoader.cs --- MapControl/Shared/TileImageLoader.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MapControl/Shared/TileImageLoader.cs b/MapControl/Shared/TileImageLoader.cs index ed10176b..37e65b00 100644 --- a/MapControl/Shared/TileImageLoader.cs +++ b/MapControl/Shared/TileImageLoader.cs @@ -43,6 +43,12 @@ namespace MapControl /// public static TimeSpan DefaultCacheExpiration { get; set; } = TimeSpan.FromDays(1); + /// + /// Minimum expiration time for cached tile images. A transmitted expiration time + /// that falls below this value is ignored. The default value is TimeSpan.Zero. + /// + public static TimeSpan MinCacheExpiration { get; set; } = TimeSpan.Zero; + /// /// Maximum expiration time for cached tile images. A transmitted expiration time /// that exceeds this value is ignored. The default value is ten days. @@ -170,6 +176,7 @@ namespace MapControl try { var expiration = !response.MaxAge.HasValue ? DefaultCacheExpiration + : response.MaxAge.Value < MinCacheExpiration ? MinCacheExpiration : response.MaxAge.Value > MaxCacheExpiration ? MaxCacheExpiration : response.MaxAge.Value;