@philiprehberger/cache-kit 0.3.2 → 0.3.4
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 +14 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @philiprehberger/cache-kit
|
|
2
2
|
|
|
3
|
-
[](https://github.com/philiprehberger/cache-kit/actions/workflows/ci.yml)
|
|
3
|
+
[](https://github.com/philiprehberger/ts-cache-kit/actions/workflows/ci.yml)
|
|
4
4
|
[](https://www.npmjs.com/package/@philiprehberger/cache-kit)
|
|
5
|
-
[](LICENSE)
|
|
5
|
+
[](LICENSE)
|
|
6
6
|
|
|
7
|
-
In-memory LRU cache with TTL, stale-while-revalidate, and tag invalidation
|
|
7
|
+
In-memory LRU cache with TTL, stale-while-revalidate, and tag invalidation
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
@@ -102,7 +102,7 @@ const data = cache.dump(); // serialize to JSON
|
|
|
102
102
|
cache.load(data); // restore from JSON
|
|
103
103
|
```
|
|
104
104
|
|
|
105
|
-
## API
|
|
105
|
+
## API
|
|
106
106
|
|
|
107
107
|
### `createCache<V>(options?: CacheOptions): Cache<V>`
|
|
108
108
|
|
|
@@ -146,7 +146,16 @@ Extends `SetOptions` with:
|
|
|
146
146
|
|
|
147
147
|
### Duration Strings
|
|
148
148
|
|
|
149
|
-
`"100ms"`, `"30s"`, `"5m"`, `"1h"`, `"1d"` — or pass milliseconds as a number
|
|
149
|
+
`"100ms"`, `"30s"`, `"5m"`, `"1h"`, `"1d"` — or pass milliseconds as a number
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
## Development
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
npm install
|
|
156
|
+
npm run build
|
|
157
|
+
npm test
|
|
158
|
+
```
|
|
150
159
|
|
|
151
160
|
## License
|
|
152
161
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@philiprehberger/cache-kit",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "In-memory LRU cache with TTL, stale-while-revalidate, and tag invalidation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dev": "tsup --watch",
|
|
27
27
|
"typecheck": "tsc --noEmit",
|
|
28
28
|
"prepublishOnly": "npm run build",
|
|
29
|
-
"test": "node --test
|
|
29
|
+
"test": "node --test"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"tsup": "^8.0.0",
|