fix: ignore expired anime in random pool cache
This commit is contained in:
@@ -238,7 +238,7 @@ func (q *Queries) GetAPITokenByHash(ctx context.Context, tokenHash string) (ApiT
|
||||
|
||||
const getAllCachedAnime = `-- 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
|
||||
`
|
||||
|
||||
func (q *Queries) GetAllCachedAnime(ctx context.Context) ([]string, error) {
|
||||
|
||||
Reference in New Issue
Block a user