@spoosh/plugin-cache 0.3.0 → 0.3.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 +6 -6
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Response caching plugin for Spoosh with configurable stale time.
|
|
4
4
|
|
|
5
|
-
**[Documentation](https://spoosh.dev/docs/plugins/cache)** · **Requirements:** TypeScript >= 5.0 · **Peer Dependencies:** `@spoosh/core`
|
|
5
|
+
**[Documentation](https://spoosh.dev/docs/react/plugins/cache)** · **Requirements:** TypeScript >= 5.0 · **Peer Dependencies:** `@spoosh/core`
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
@@ -52,9 +52,9 @@ await trigger({ clearCache: true });
|
|
|
52
52
|
await trigger({ clearCache: true, invalidate: "*" });
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
| Option | Type | Description
|
|
56
|
-
| ------------ | --------- |
|
|
57
|
-
| `clearCache` | `boolean` | Clear all cached data after mutation succeeds
|
|
55
|
+
| Option | Type | Description |
|
|
56
|
+
| ------------ | --------- | --------------------------------------------- |
|
|
57
|
+
| `clearCache` | `boolean` | Clear all cached data after mutation succeeds |
|
|
58
58
|
|
|
59
59
|
## Instance API
|
|
60
60
|
|
|
@@ -76,7 +76,7 @@ function handleUserSwitch() {
|
|
|
76
76
|
}
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
| Method | Description
|
|
80
|
-
| ---------------------------------- |
|
|
79
|
+
| Method | Description |
|
|
80
|
+
| ---------------------------------- | ------------------------------------------------- |
|
|
81
81
|
| `clearCache()` | Clears all cached data without triggering refetch |
|
|
82
82
|
| `clearCache({ refetchAll: true })` | Clears cache and triggers all queries to refetch |
|
package/dist/index.d.mts
CHANGED
|
@@ -35,7 +35,7 @@ type CacheWriteResult = object;
|
|
|
35
35
|
*
|
|
36
36
|
* @param config - Plugin configuration
|
|
37
37
|
*
|
|
38
|
-
* @see {@link https://spoosh.dev/docs/plugins/cache | Cache Plugin Documentation}
|
|
38
|
+
* @see {@link https://spoosh.dev/docs/react/plugins/cache | Cache Plugin Documentation}
|
|
39
39
|
*
|
|
40
40
|
* @example
|
|
41
41
|
* ```ts
|
package/dist/index.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ type CacheWriteResult = object;
|
|
|
35
35
|
*
|
|
36
36
|
* @param config - Plugin configuration
|
|
37
37
|
*
|
|
38
|
-
* @see {@link https://spoosh.dev/docs/plugins/cache | Cache Plugin Documentation}
|
|
38
|
+
* @see {@link https://spoosh.dev/docs/react/plugins/cache | Cache Plugin Documentation}
|
|
39
39
|
*
|
|
40
40
|
* @example
|
|
41
41
|
* ```ts
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spoosh/plugin-cache",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Response caching plugin for Spoosh with configurable stale time",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/
|
|
8
|
+
"url": "git+https://github.com/spooshdev/spoosh.git",
|
|
9
9
|
"directory": "packages/plugin-cache"
|
|
10
10
|
},
|
|
11
11
|
"bugs": {
|
|
12
|
-
"url": "https://github.com/
|
|
12
|
+
"url": "https://github.com/spooshdev/spoosh/issues"
|
|
13
13
|
},
|
|
14
|
-
"homepage": "https://spoosh.dev/react/
|
|
14
|
+
"homepage": "https://spoosh.dev/docs/react/plugins/cache",
|
|
15
15
|
"publishConfig": {
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"@spoosh/core": ">=0.8.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@spoosh/
|
|
40
|
-
"@spoosh/
|
|
39
|
+
"@spoosh/test-utils": "0.1.5",
|
|
40
|
+
"@spoosh/core": "0.10.0"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"dev": "tsup --watch",
|