Skip to content

Commit 8711a94

Browse files
committedDec 11, 2024
fix(upstash): drop base prefix from keyKeys
1 parent d73140c commit 8711a94

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎src/drivers/upstash.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,12 @@ export default defineDriver<UpstashOptions, Redis>(
5252
.del(r(key))
5353
.then(() => {});
5454
},
55-
getKeys(base) {
56-
return getClient().keys(r(base, "*"));
55+
getKeys(_base) {
56+
return getClient()
57+
.keys(r(_base, "*"))
58+
.then((keys) =>
59+
base ? keys.map((key) => key.slice(base.length + 1)) : keys
60+
);
5761
},
5862
async clear(base) {
5963
const keys = await getClient().keys(r(base, "*"));

0 commit comments

Comments
 (0)
Please sign in to comment.