What sort of caching do the javascript based SDKS ...
# announcements
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.
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.
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
Copy code
const { configureCache } = require("@growthbook/growthbook");

// after SDK is initialized, optional fields:
  backgroundSync: true;
  cacheKey: "somethingElse";
  staleTTL: 3600;
Appreciate the quick response!