@b9g/cache-redis 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/index.d.ts +1 -0
- package/src/index.js +7 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@b9g/cache-redis",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Redis cache implementation for Shovel cache system",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cache",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
|
-
"url": "https://github.com/
|
|
15
|
+
"url": "https://github.com/bikeshaving/shovel.git",
|
|
16
16
|
"directory": "packages/cache-redis"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@b9g/libuild": "^0.1.18"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@b9g/cache": "^0.2.
|
|
26
|
+
"@b9g/cache": "^0.2.2"
|
|
27
27
|
},
|
|
28
28
|
"type": "module",
|
|
29
29
|
"types": "src/index.d.ts",
|
package/src/index.d.ts
CHANGED
package/src/index.js
CHANGED
|
@@ -214,14 +214,16 @@ var RedisCache = class extends Cache {
|
|
|
214
214
|
try {
|
|
215
215
|
const cacheKey = key.replace(`${this.#prefix}:`, "");
|
|
216
216
|
const colonIndex = cacheKey.indexOf(":");
|
|
217
|
-
if (colonIndex === -1)
|
|
217
|
+
if (colonIndex === -1)
|
|
218
|
+
continue;
|
|
218
219
|
const method = cacheKey.substring(0, colonIndex);
|
|
219
220
|
const url = cacheKey.substring(colonIndex + 1);
|
|
220
221
|
if (method && url) {
|
|
221
222
|
requests.push(new Request(url, { method }));
|
|
222
223
|
}
|
|
223
224
|
} catch (err) {
|
|
224
|
-
if (!(err instanceof TypeError))
|
|
225
|
+
if (!(err instanceof TypeError))
|
|
226
|
+
throw err;
|
|
225
227
|
}
|
|
226
228
|
}
|
|
227
229
|
return requests;
|
|
@@ -252,6 +254,8 @@ var RedisCache = class extends Cache {
|
|
|
252
254
|
}
|
|
253
255
|
}
|
|
254
256
|
};
|
|
257
|
+
var src_default = RedisCache;
|
|
255
258
|
export {
|
|
256
|
-
RedisCache
|
|
259
|
+
RedisCache,
|
|
260
|
+
src_default as default
|
|
257
261
|
};
|