mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 15:05:50 +00:00
Version 4.12.2 Improved ImageLoader/TileImageLoader
This commit is contained in:
parent
4a7e384152
commit
fefc4e3294
9 changed files with 102 additions and 171 deletions
|
|
@ -107,6 +107,7 @@ namespace MapControl.Caching
|
|||
try
|
||||
{
|
||||
//Debug.WriteLine("ImageFileCache: Reading " + path);
|
||||
|
||||
buffer = File.ReadAllBytes(path);
|
||||
memoryCache.Set(key, buffer, new CacheItemPolicy());
|
||||
}
|
||||
|
|
@ -160,6 +161,7 @@ namespace MapControl.Caching
|
|||
try
|
||||
{
|
||||
//Debug.WriteLine("ImageFileCache: Writing {0}, Expires {1}", path, policy.AbsoluteExpiration.DateTime.ToLocalTime());
|
||||
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
File.WriteAllBytes(path, buffer);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue