Skip to content

Commit 96b02cf

Browse files
authored
Merge pull request #189 from fingerprintjs/docs/document-caching-default-change
docs: document caching default change INTER-1988
2 parents 0aa2155 + c835b5f commit 96b02cf

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
### ⚠ BREAKING CHANGES
55

66
* The SDK api has changed to match changes introduced in V4 version of the agent.
7+
* The default caching strategy has changed from `sessionStorage` caching to **no caching by default**, aligned with the underlying [JavaScript agent v4 default](https://docs.fingerprint.com/reference/js-agent-v4-start-function#cache).
78

89
### Features
910

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ To get your API key and get started, see the [Fingerprint Quick Start Guide](htt
7777
- Set `apiKey` to your Fingerprint [Public API Key](https://dashboard.fingerprint.com/api-keys).
7878
- Set `region` if you have chosen a non-global [region](https://docs.fingerprint.com/docs/regions) during registration.
7979
- Set `endpoint` if you are using [one of our proxy integrations to increase accuracy](https://docs.fingerprint.com/docs/protecting-the-javascript-agent-from-adblockers) and effectiveness of visitor identification.
80-
- You can use all the [start options](https://docs.fingerprint.com/reference/js-agent-v4-start-function#start-options) available in the JavaScript agent `load` function.
80+
- You can use all the [start options](https://docs.fingerprint.com/reference/js-agent-v4-start-function#start-options) available in the JavaScript agent `start()` function.
81+
- Caching is disabled by default. To enable caching, pass the JavaScript agent [`cache` start option](https://docs.fingerprint.com/reference/js-agent-v4-start-function#cache).
8182

8283
```jsx
8384
// src/index.js
@@ -95,6 +96,7 @@ const root = ReactDOM.createRoot(document.getElementById('app'))
9596
root.render(
9697
<FingerprintProvider
9798
apiKey='your-public-api-key'
99+
cache={{ storage: 'sessionStorage', duration: 3600 }}
98100
>
99101
<App />
100102
</FingerprintProvider>

0 commit comments

Comments
 (0)