utilitas 2000.3.19 → 2000.3.20
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/README.md +1 -0
- package/config.sample.json +51 -1
- package/dist/utilitas.lite.mjs +1 -1
- package/dist/utilitas.lite.mjs.map +1 -1
- package/lib/cache.mjs +9 -1
- package/lib/manifest.mjs +1 -1
- package/package.json +1 -1
package/lib/cache.mjs
CHANGED
|
@@ -23,7 +23,14 @@ const init = async (options) => {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
assert(redis, 'Redis has not been initialized.', 501);
|
|
26
|
-
return
|
|
26
|
+
return redis;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const end = async () => {
|
|
30
|
+
if (redis) {
|
|
31
|
+
await redis.quit();
|
|
32
|
+
redis = null;
|
|
33
|
+
}
|
|
27
34
|
};
|
|
28
35
|
|
|
29
36
|
const assertKey = key => {
|
|
@@ -47,6 +54,7 @@ export {
|
|
|
47
54
|
init,
|
|
48
55
|
set,
|
|
49
56
|
setEx,
|
|
57
|
+
end,
|
|
50
58
|
};
|
|
51
59
|
|
|
52
60
|
|
package/lib/manifest.mjs
CHANGED