Skip to content

Commit f32a895

Browse files
committed
Release v3.0.1
1 parent 8f28d53 commit f32a895

File tree

5 files changed

+18
-15
lines changed

5 files changed

+18
-15
lines changed

.github/workflows/run-tests.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22

33
name: Run tests
44

5-
on:
6-
push:
7-
branches: [ "master" ]
8-
pull_request:
9-
branches: [ "master" ]
5+
on: [push, pull_request]
106

117
jobs:
128
build:

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## v3.0.1 - 17 Oct, 2022
4+
5+
Fixed bug where the `redisStore.del` would no longer accept an options object, which broke the multiCaching interface.
6+
37
## v3.0.0 - 15 Oct, 2022
48

59
Upgraded to redis@^4

dist/index.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -479,9 +479,9 @@ var buildRedisStoreWithConfig = function buildRedisStoreWithConfig(redisCache, c
479479
_context.next = 7;
480480
break;
481481
}
482-
return _context.abrupt("return", redisCache.setEx(key, ttl, getValue(value)));
482+
return _context.abrupt("return", redisCache.setEx(key, ttl, encodeValue(value)));
483483
case 7:
484-
return _context.abrupt("return", redisCache.set(key, getValue(value)));
484+
return _context.abrupt("return", redisCache.set(key, encodeValue(value)));
485485
case 8:
486486
case "end":
487487
return _context.stop();
@@ -510,7 +510,7 @@ var buildRedisStoreWithConfig = function buildRedisStoreWithConfig(redisCache, c
510510
}
511511
return _context2.abrupt("return", null);
512512
case 5:
513-
return _context2.abrupt("return", options.parse !== false ? JSON.parse(val) : val);
513+
return _context2.abrupt("return", options.parse !== false ? decodeValue(val) : val);
514514
case 6:
515515
case "end":
516516
return _context2.stop();
@@ -561,7 +561,7 @@ var buildRedisStoreWithConfig = function buildRedisStoreWithConfig(redisCache, c
561561
if (!isCacheableValue(value)) {
562562
throw new Error("\"".concat(value, "\" is not a cacheable value"));
563563
}
564-
return [key, getValue(value)];
564+
return [key, encodeValue(value)];
565565
}).filter(function (key) {
566566
return key !== null;
567567
});
@@ -619,7 +619,7 @@ var buildRedisStoreWithConfig = function buildRedisStoreWithConfig(redisCache, c
619619
if (val === null) {
620620
return null;
621621
}
622-
return options.parse !== false ? JSON.parse(val) : val;
622+
return options.parse !== false ? decodeValue(val) : val;
623623
});
624624
}));
625625
case 4:
@@ -825,9 +825,12 @@ var buildRedisStoreWithConfig = function buildRedisStoreWithConfig(redisCache, c
825825
}
826826
};
827827
};
828-
function getValue(value) {
828+
function encodeValue(value) {
829829
return JSON.stringify(value) || '"undefined"';
830830
}
831+
function decodeValue(val) {
832+
return JSON.parse(val);
833+
}
831834
function isObject(object) {
832835
return _typeof(object) === 'object' && !Array.isArray(object) && object !== null;
833836
}

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "cache-manager-redis-store",
33
"author": "Matthijs Dabroek <[email protected]>",
44
"description": "Redis store for node-cache-manager",
5-
"version": "3.0.0",
5+
"version": "3.0.1",
66
"license": "MIT",
77
"main": "dist/index.js",
88
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)