mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-19 13:25:09 +00:00
Update FileDbCache.cs
This commit is contained in:
parent
339fcbe3a4
commit
691e19ebea
1 changed files with 2 additions and 9 deletions
|
|
@ -91,16 +91,9 @@ namespace MapControl.Caching
|
||||||
{
|
{
|
||||||
var record = fileDb.GetRecordByKey(key, new string[] { valueField, expiresField }, false);
|
var record = fileDb.GetRecordByKey(key, new string[] { valueField, expiresField }, false);
|
||||||
|
|
||||||
if (record != null)
|
if (record != null && (DateTime)record[1] > DateTime.UtcNow)
|
||||||
{
|
{
|
||||||
if ((DateTime)record[1] > DateTime.UtcNow)
|
value = (byte[])record[0];
|
||||||
{
|
|
||||||
value = (byte[])record[0];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fileDb.DeleteRecordByKey(key);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue