From 96dcaa2b18643cbb2000ba25536d7c14ce663e4f Mon Sep 17 00:00:00 2001 From: Johaven Date: Mon, 13 May 2024 02:06:55 +0200 Subject: [PATCH] fix: allow multiple wildcards in keys func (#4) --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 6784eb8..b1fa760 100644 --- a/src/index.ts +++ b/src/index.ts @@ -149,7 +149,7 @@ CREATE INDEX IF NOT EXISTS idx_expired_caches ON ${tableName}(expiredAt); keys(pattern?: string): Promise { return new Promise((resolve, reject) => { try { - const result = (finderStatement.all(pattern?.replace("*", "%") ?? "%", now()) as CacheObject[]).map( + const result = (finderStatement.all(pattern?.replaceAll("*", "%") ?? "%", now()) as CacheObject[]).map( (cache) => cache.cacheKey, ); resolve(result);