@spoosh/plugin-cache 0.2.0 → 0.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 -3
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ const client = new Spoosh<ApiSchema, Error>("/api").use([
|
|
|
21
21
|
]);
|
|
22
22
|
|
|
23
23
|
// Per-query override
|
|
24
|
-
useRead((api) => api.
|
|
24
|
+
useRead((api) => api("posts").GET(), { staleTime: 10000 });
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
## Options
|
|
@@ -53,6 +53,6 @@ function handleLogout() {
|
|
|
53
53
|
}
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
| Method | Description
|
|
57
|
-
| ------------ |
|
|
56
|
+
| Method | Description |
|
|
57
|
+
| ------------ | -------------------------------------------------------- |
|
|
58
58
|
| `clearCache` | Clears all cached data. Useful for logout/user switching |
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spoosh/plugin-cache",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Response caching plugin for Spoosh with configurable stale time",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@spoosh/core": ">=0.4.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@spoosh/core": "0.
|
|
39
|
+
"@spoosh/core": "0.6.0",
|
|
40
40
|
"@spoosh/test-utils": "0.1.5"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|