Skip to content

Commit f5aa86d

Browse files
authored
Merge branch 'main' into limit-update-1
2 parents 33a41fc + c439cb1 commit f5aa86d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Refresh.Core/Services/CacheService.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,16 @@ public override void Initialize()
5353

5454
// periodically automatically remove expired data if it hasn't been removed somehow else before,
5555
// to not keep unused data for a potentially undefined time
56-
Thread expirationThread = new(() =>
56+
Task expirationTask = new(async () =>
5757
{
5858
while(true)
5959
{
60-
Thread.Sleep(1000 * 60 * 2);
60+
await Task.Delay(1000 * 60 * 2);
6161
this.RemoveExpiredCache();
6262
}
6363
});
64-
expirationThread.Start();
64+
65+
expirationTask.Start();
6566
}
6667

6768
private void RemoveExpiredCache()

0 commit comments

Comments
 (0)