We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 10eec63 commit 90d94f8Copy full SHA for 90d94f8
src/cache.ts
@@ -122,13 +122,15 @@ export class InMemoryCryptoKeyCache {
122
key: string,
123
setValFn: (key: string) => Promise<CacheElement<CryptoKey>>
124
): Promise<CryptoKey> {
125
+ const prefixedKey = `${this.ctx.prefix ?? ''}/${key}`;
126
+
127
const refreshCache = async () => {
128
const val = await setValFn(key);
- InMemoryCryptoKeyCache.store.set(key, val);
129
+ InMemoryCryptoKeyCache.store.set(prefixedKey, val);
130
return val.value;
131
};
132
- const cachedValue = InMemoryCryptoKeyCache.store.get(key);
133
+ const cachedValue = InMemoryCryptoKeyCache.store.get(prefixedKey);
134
if (cachedValue) {
135
this.ctx.waitUntil(
136
(() => {
0 commit comments