Skip to content

Commit 8fde5d6

Browse files
committed
update readme
1 parent c81e4f9 commit 8fde5d6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,18 @@ Replace the `RELEWISE_DATASET_ID`, `RELEWISE_API_KEY` and `RELEWISE_SERVER_URL`
4040
After which you have access to various methods depending on the client you've bootstrapped.
4141

4242
***Note: serverUrl is not required and will default to https://api.relewise.com/***
43+
44+
#### Cache mode
45+
By default, clients use `cache: 'no-cache'` to ensure responses are always fresh — this prevents stale results that could break personalization.
46+
However, some service workers (often used in integrations) do not support the `no-cache` mode.
47+
48+
```ts
49+
const integrator = new Integrator(RELEWISE_DATASET_ID, RELEWISE_API_KEY, {
50+
serverUrl: RELEWISE_SERVER_URL,
51+
cache: 'default'
52+
});
53+
```
54+
4355
### Tracking
4456

4557
If you need to track e.g. Product-, Category or Content Views, track Cart Updates or Completed Orders in your solution, you need to use the `Tracker`

0 commit comments

Comments
 (0)