You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: clients/algoliasearch-client-javascript/packages/client-common/src/types/transporter.ts
+12-4Lines changed: 12 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -98,10 +98,18 @@ export type TransporterOptions = {
98
98
requester: Requester;
99
99
100
100
/**
101
-
* The cache of the requests. When requests are
102
-
* `cacheable`, the returned promised persists
103
-
* in this cache to shared in similar requests
104
-
* before being resolved.
101
+
* Cache used to store in-flight requests.
102
+
* When a request is marked as `cacheable`, its returned Promise
103
+
* is stored in this cache so that identical requests can share
104
+
* the same Promise before it resolves.
105
+
*
106
+
* @warning
107
+
* The provided cache **must not** serialize stored values.
108
+
*
109
+
* Since in-flight requests are stored as Promises (which cannot be
110
+
* serialized to JSON), using a serializing cache will cause failures.
111
+
*
112
+
* Make sure to use a non-serializing cache implementation, such as `createMemoryCache({ serializable: false })` or to disable request caching with `createNullCache()`
0 commit comments