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;