fix: ignore expired anime in random pool cache

This commit is contained in:
2026-06-21 17:18:11 +02:00
parent 07f6080451
commit dbe029e15e
3 changed files with 49 additions and 2 deletions

View File

@@ -357,4 +357,4 @@ LIMIT ?;
-- name: GetAllCachedAnime :many
SELECT data FROM jikan_cache
WHERE key LIKE 'anime:%' LIMIT 1000;
WHERE key LIKE 'anime:%' AND datetime(expires_at) > CURRENT_TIMESTAMP LIMIT 1000;