https://www.growthbook.io/ logo
#ask-questions
Title
# ask-questions
c

clever-helmet-13121

12/22/2023, 8:21 AM
Hello team 👋 We're doing some assessment of our scripts and cookies and noticed that GrowthBook stores
gbFeaturesCache
in local storage. I think the name is pretty self-explanatory, but would be happy if you can provide a description of the purpose? Does it have any retention period or is it stored on the device forever?
f

fresh-football-47124

12/22/2023, 5:01 PM
Hi Sean, sure - the local storage is used to keep a copy of the features and rules from the SDK endpoint. It will be considered stale after 1 minute. You can find the code for this here: https://github.com/growthbook/growthbook/blob/main/packages/sdk-js/src/feature-repository.ts
The purpose is to reduce the need for network calls when using GrowthBook on the client side.
3 Views