mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-20 22:05:07 +00:00
Update SQLiteCache.cs
This commit is contained in:
parent
de460142b8
commit
13f4cfcdfb
1 changed files with 3 additions and 3 deletions
|
|
@ -18,7 +18,7 @@ namespace MapControl.Caching
|
||||||
public sealed class SQLiteCache : IDistributedCache, IDisposable
|
public sealed class SQLiteCache : IDistributedCache, IDisposable
|
||||||
{
|
{
|
||||||
private readonly SQLiteConnection connection;
|
private readonly SQLiteConnection connection;
|
||||||
private readonly Timer expirationScanTimer;
|
private readonly Timer timer;
|
||||||
|
|
||||||
public SQLiteCache(string path)
|
public SQLiteCache(string path)
|
||||||
: this(path, TimeSpan.FromHours(1))
|
: this(path, TimeSpan.FromHours(1))
|
||||||
|
|
@ -54,13 +54,13 @@ namespace MapControl.Caching
|
||||||
|
|
||||||
if (expirationScanFrequency > TimeSpan.Zero)
|
if (expirationScanFrequency > TimeSpan.Zero)
|
||||||
{
|
{
|
||||||
expirationScanTimer = new Timer(_ => DeleteExpiredItems(), null, TimeSpan.Zero, expirationScanFrequency);
|
timer = new Timer(_ => DeleteExpiredItems(), null, TimeSpan.Zero, expirationScanFrequency);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
expirationScanTimer?.Dispose();
|
timer?.Dispose();
|
||||||
connection.Dispose();
|
connection.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue