@mysetup/cache 1.1.0 → 1.3.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/cache.d.ts +1 -1
- package/dist/cache.d.ts.map +1 -1
- package/dist/cache.js +2 -2
- package/package.json +3 -3
package/dist/cache.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const setCacheData: (key: string, value: unknown) => void;
|
|
1
|
+
declare const setCacheData: (key: string, value: unknown, expiry: number) => void;
|
|
2
2
|
declare const getCacheData: (key: string) => unknown;
|
|
3
3
|
declare const deleteCacheData: (key: string) => number;
|
|
4
4
|
export { setCacheData, getCacheData, deleteCacheData };
|
package/dist/cache.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../cache.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,YAAY,QAAS,MAAM,SAAS,OAAO,
|
|
1
|
+
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../cache.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,YAAY,QAAS,MAAM,SAAS,OAAO,UAAU,MAAM,SAEhE,CAAC;AAGF,QAAA,MAAM,YAAY,QAAS,MAAM,YAEhC,CAAC;AAGF,QAAA,MAAM,eAAe,QAAS,MAAM,WAEnC,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC"}
|
package/dist/cache.js
CHANGED
|
@@ -7,8 +7,8 @@ exports.deleteCacheData = exports.getCacheData = exports.setCacheData = void 0;
|
|
|
7
7
|
var node_cache_1 = __importDefault(require("node-cache"));
|
|
8
8
|
var cache = new node_cache_1.default();
|
|
9
9
|
// Function to set data in the cache
|
|
10
|
-
var setCacheData = function (key, value) {
|
|
11
|
-
cache.set(key, value);
|
|
10
|
+
var setCacheData = function (key, value, expiry) {
|
|
11
|
+
cache.set(key, value, expiry);
|
|
12
12
|
};
|
|
13
13
|
exports.setCacheData = setCacheData;
|
|
14
14
|
// Function to get data from the cache
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mysetup/cache",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"@mysetup/eslint-config": "latest",
|
|
30
30
|
"@mysetup/prettier-config": "latest",
|
|
31
31
|
"@mysetup/tsconfig": "latest",
|
|
32
|
-
"@types/node": "^22.
|
|
33
|
-
"typescript": "^5.
|
|
32
|
+
"@types/node": "^22.13.1",
|
|
33
|
+
"typescript": "^5.7.3"
|
|
34
34
|
},
|
|
35
35
|
"prettier": "@mysetup/prettier-config",
|
|
36
36
|
"engines": {
|