@philiprehberger/cache-kit 0.3.3 → 0.3.5
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 +24 -7
- 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)
|
|
4
4
|
[](https://www.npmjs.com/package/@philiprehberger/cache-kit)
|
|
5
|
-
[](https://github.com/philiprehberger/cache-kit/commits/main)
|
|
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,8 +146,7 @@ Extends `SetOptions` with:
|
|
|
146
146
|
|
|
147
147
|
### Duration Strings
|
|
148
148
|
|
|
149
|
-
`"100ms"`, `"30s"`, `"5m"`, `"1h"`, `"1d"` — or pass milliseconds as a number
|
|
150
|
-
|
|
149
|
+
`"100ms"`, `"30s"`, `"5m"`, `"1h"`, `"1d"` — or pass milliseconds as a number
|
|
151
150
|
|
|
152
151
|
## Development
|
|
153
152
|
|
|
@@ -157,6 +156,24 @@ npm run build
|
|
|
157
156
|
npm test
|
|
158
157
|
```
|
|
159
158
|
|
|
159
|
+
## Support
|
|
160
|
+
|
|
161
|
+
If you find this project useful:
|
|
162
|
+
|
|
163
|
+
⭐ [Star the repo](https://github.com/philiprehberger/cache-kit)
|
|
164
|
+
|
|
165
|
+
🐛 [Report issues](https://github.com/philiprehberger/cache-kit/issues?q=is%3Aissue+is%3Aopen+label%3Abug)
|
|
166
|
+
|
|
167
|
+
💡 [Suggest features](https://github.com/philiprehberger/cache-kit/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement)
|
|
168
|
+
|
|
169
|
+
❤️ [Sponsor development](https://github.com/sponsors/philiprehberger)
|
|
170
|
+
|
|
171
|
+
🌐 [All Open Source Projects](https://philiprehberger.com/open-source-packages)
|
|
172
|
+
|
|
173
|
+
💻 [GitHub Profile](https://github.com/philiprehberger)
|
|
174
|
+
|
|
175
|
+
🔗 [LinkedIn Profile](https://www.linkedin.com/in/philiprehberger)
|
|
176
|
+
|
|
160
177
|
## License
|
|
161
178
|
|
|
162
|
-
MIT
|
|
179
|
+
[MIT](LICENSE)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@philiprehberger/cache-kit",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
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",
|