@qelos/cache-manager 3.8.3 → 3.9.0
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/dist/redis-cache.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createRedisCache = void 0;
|
|
4
|
-
const
|
|
4
|
+
const node_util_1 = require("node:util");
|
|
5
5
|
const redis_1 = require("redis");
|
|
6
6
|
function createRedisCache(redisUrl) {
|
|
7
7
|
const client = (0, redis_1.createClient)(redisUrl);
|
|
@@ -11,8 +11,8 @@ function createRedisCache(redisUrl) {
|
|
|
11
11
|
client.on("error", function (error) {
|
|
12
12
|
console.warn("failed to connect to redis server");
|
|
13
13
|
});
|
|
14
|
-
const getItem = (0,
|
|
15
|
-
const setItem = (0,
|
|
14
|
+
const getItem = (0, node_util_1.promisify)(client.get).bind(client);
|
|
15
|
+
const setItem = (0, node_util_1.promisify)(client.set).bind(client);
|
|
16
16
|
return {
|
|
17
17
|
getItem,
|
|
18
18
|
async setItem(key, value, { ttl }) {
|
package/dist/redis-cache.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redis-cache.js","sourceRoot":"","sources":["../redis-cache.ts"],"names":[],"mappings":";;;AACA
|
|
1
|
+
{"version":3,"file":"redis-cache.js","sourceRoot":"","sources":["../redis-cache.ts"],"names":[],"mappings":";;;AACA,yCAAsC;AACtC,iCAAqC;AAGrC,SAAgB,gBAAgB,CAAC,QAAgB;IAC7C,MAAM,MAAM,GAAG,IAAA,oBAAY,EAAC,QAAQ,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE;QACjB,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IACH,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,KAAK;QAC9B,OAAO,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,IAAA,qBAAS,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACnD,MAAM,OAAO,GAAG,IAAA,qBAAS,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAEnD,OAAO;QACH,OAAO;QACP,KAAK,CAAC,OAAO,CAAC,GAAW,EAAE,KAAa,EAAE,EAAE,GAAG,EAAuB;YAClE,MAAM,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YAC1B,IAAI,GAAG,EAAE;gBACL,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;aAC3B;QACL,CAAC;KACJ,CAAC;AACN,CAAC;AArBD,4CAqBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qelos/cache-manager",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"private": false,
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
"publishConfig": {
|
|
21
21
|
"access": "public"
|
|
22
22
|
},
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "13468bc51557291935b96b1aeaa837b8b52861e8"
|
|
24
24
|
}
|
|
Binary file
|
package/redis-cache.ts
CHANGED