@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 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.posts.$get(), { staleTime: 10000 });
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
@@ -41,7 +41,7 @@ type CacheWriteResult = object;
41
41
  * ]);
42
42
  *
43
43
  * // Per-query override
44
- * useRead((api) => api.posts.$get(), {
44
+ * useRead((api) => api("posts").GET(), {
45
45
  * staleTime: 10000,
46
46
  * });
47
47
  * ```
package/dist/index.d.ts CHANGED
@@ -41,7 +41,7 @@ type CacheWriteResult = object;
41
41
  * ]);
42
42
  *
43
43
  * // Per-query override
44
- * useRead((api) => api.posts.$get(), {
44
+ * useRead((api) => api("posts").GET(), {
45
45
  * staleTime: 10000,
46
46
  * });
47
47
  * ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spoosh/plugin-cache",
3
- "version": "0.2.0",
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.5.0",
39
+ "@spoosh/core": "0.6.0",
40
40
  "@spoosh/test-utils": "0.1.5"
41
41
  },
42
42
  "scripts": {