fix: bound stale jikan cache reads

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

View File

@@ -567,7 +567,7 @@ func (q *Queries) GetJikanCache(ctx context.Context, key string) (string, error)
const getJikanCacheStale = `-- name: GetJikanCacheStale :one
SELECT data FROM jikan_cache
WHERE key = ? LIMIT 1
WHERE key = ? AND datetime(expires_at) > datetime(CURRENT_TIMESTAMP, '-14 days') LIMIT 1
`
func (q *Queries) GetJikanCacheStale(ctx context.Context, key string) (string, error) {