Skip to content

Commit

Permalink
fix: allow multiple wildcards in keys func (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
johaven authored May 13, 2024
1 parent e0658a5 commit 96dcaa2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ CREATE INDEX IF NOT EXISTS idx_expired_caches ON ${tableName}(expiredAt);
keys(pattern?: string): Promise<string[]> {
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);
Expand Down

0 comments on commit 96dcaa2

Please sign in to comment.