What sort of caching do the javascript based SDKS do?
There is a section called Built-in Fetching and Caching, but no information about how the caching actually works.
h
happy-autumn-40938
03/13/2023, 5:48 PM
Out of the box, built in caching will include:
a. In memory cache, which avoids extra lookups within a given SDK session
b. window.localStorage, to persist cache across browser sessions
If you are using the SDK in a backend context, you can provide your own polyfill for localStorage and route it to use a cache system of your choosing.
✅ 1
happy-autumn-40938
03/13/2023, 5:53 PM
Specific cache strategy uses a stale-while-revalidate approach, with the default stale timeout being 60 seconds. You can override this using SDK's exported function