From d1d15da1eaacc827b9608f250dd364acf64f4895 Mon Sep 17 00:00:00 2001 From: ClemensFischer Date: Tue, 25 Feb 2025 20:57:13 +0100 Subject: [PATCH] Update SQLiteCache.cs --- Caches/SQLiteCache/SQLiteCache.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Caches/SQLiteCache/SQLiteCache.cs b/Caches/SQLiteCache/SQLiteCache.cs index aba6f30d..a0a3d823 100644 --- a/Caches/SQLiteCache/SQLiteCache.cs +++ b/Caches/SQLiteCache/SQLiteCache.cs @@ -197,9 +197,9 @@ namespace MapControl.Caching private SQLiteCommand GetItemCommand(string key) { - var command = new SQLiteCommand("select buffer from items where key = @key and expiration > @now", connection); + var command = new SQLiteCommand("select buffer from items where key = @key and expiration > @exp", connection); command.Parameters.AddWithValue("@key", key); - command.Parameters.AddWithValue("@now", DateTimeOffset.UtcNow.Ticks); + command.Parameters.AddWithValue("@exp", DateTimeOffset.UtcNow.Ticks); return command; } @@ -224,8 +224,8 @@ namespace MapControl.Caching private SQLiteCommand DeleteExpiredItemCommand() { - var command = new SQLiteCommand("delete from items where expiration <= @now; select changes()", connection); - command.Parameters.AddWithValue("@now", DateTimeOffset.UtcNow.Ticks); + var command = new SQLiteCommand("delete from items where expiration <= @exp; select changes()", connection); + command.Parameters.AddWithValue("@exp", DateTimeOffset.UtcNow.Ticks); return command; }