@cacheable/node-cache 1.1.0 → 1.2.1
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 +3 -1
- package/dist/index.cjs +0 -1
- package/dist/index.js +0 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -79,13 +79,15 @@ When initializing the cache you can pass in the options below:
|
|
|
79
79
|
|
|
80
80
|
```javascript
|
|
81
81
|
export type NodeCacheStoreOptions = {
|
|
82
|
-
ttl?: number; // The standard ttl as number in
|
|
82
|
+
ttl?: number; // The standard ttl as number in milliseconds for every generated cache element. 0 = unlimited
|
|
83
83
|
primary?: Keyv; // The primary storage adapter
|
|
84
84
|
secondary?: Keyv; // The secondary storage adapter
|
|
85
85
|
maxKeys?: number; // Default is 0 (unlimited). If this is set it will throw and error if you try to set more keys than the max.
|
|
86
86
|
};
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
+
Note: the `ttl` is now in milliseconds and not seconds like `stdTTL` in `NodeCache`.
|
|
90
|
+
|
|
89
91
|
### Node Cache Store API
|
|
90
92
|
|
|
91
93
|
* `set(key: string | number, value: any, ttl?: number): Promise<boolean>` - Set a key value pair with an optional ttl (in milliseconds). Will return true on success. If the ttl is not set it will default to 0 (no ttl)
|
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cacheable/node-cache",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Simple and Maintained fast NodeJS internal caching",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"cacheable-node"
|
|
28
28
|
],
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@types/node": "^22.
|
|
30
|
+
"@types/node": "^22.7.4",
|
|
31
31
|
"@vitest/coverage-v8": "^2.1.1",
|
|
32
32
|
"rimraf": "^6.0.1",
|
|
33
33
|
"tsup": "^8.3.0",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"xo": "^0.59.3"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"cacheable": "^1.
|
|
39
|
+
"cacheable": "^1.6.0",
|
|
40
40
|
"eventemitter3": "^5.0.1",
|
|
41
|
-
"keyv": "^5.0.
|
|
41
|
+
"keyv": "^5.0.3"
|
|
42
42
|
},
|
|
43
43
|
"files": [
|
|
44
44
|
"dist",
|