hallowed-toothbrush-30835
06/23/2023, 6:33 PMfresh-football-47124
hallowed-toothbrush-30835
06/23/2023, 6:34 PMfresh-football-47124
hallowed-toothbrush-30835
06/23/2023, 6:37 PM_await_ growthbook.loadFeatures({ autoRefresh: true, skipCache: true });
fresh-football-47124
hallowed-toothbrush-30835
06/23/2023, 6:43 PMfresh-football-47124
hallowed-toothbrush-30835
06/23/2023, 6:44 PMfresh-football-47124
hallowed-toothbrush-30835
06/23/2023, 6:45 PMconst growthbook = new GrowthBook({
apiHost: "<https://cdn.growthbook.io>",
clientKey: "sdk-HZXDl2WDRqjPt9CJ",
enableDevMode: true,
trackingCallback: (experiment, result) => {
// TODO: Use your real analytics tracking system
console.log("Viewed Experiment", {
experimentId: experiment.key,
variationId: result.key,
});
},
});
fresh-football-47124
hallowed-toothbrush-30835
06/23/2023, 6:45 PMfresh-football-47124
console.log("all features", growthbook.getFeatures());
hallowed-toothbrush-30835
06/23/2023, 6:49 PMfresh-football-47124
hallowed-toothbrush-30835
06/23/2023, 6:52 PMfresh-football-47124
happy-autumn-40938
06/23/2023, 7:07 PMskipCache: true
unless there's a good reason to do so. In this case, it might be doing more harm than good.
The CDN-cached payload (which incidentally uses a separate cache than what is controlled by skipCache
in the SDK) is sometimes slow to respond to updates. We're actively working on resolving this. Meanwhile, streaming updates should allow your SDK to respond to GB changes more quickly.
I'd want to know whether you're able to receive streaming updates. You can check your Chrome network tab and filter for our /sub
endpoint. As you toggle/modify a feature flag in the app, you should see a corresponding event appear on this endpoint. I'd start there and see whether that's actually updating for you.hallowed-toothbrush-30835
06/23/2023, 7:18 PMskipCache
disabled. And I can't receive streaming updates (I'm using the free account to make a youtube video for my channel using next + gb)happy-autumn-40938
06/23/2023, 7:22 PMhallowed-toothbrush-30835
06/23/2023, 7:23 PMhappy-autumn-40938
06/23/2023, 7:25 PMhallowed-toothbrush-30835
06/23/2023, 7:26 PMhappy-autumn-40938
06/23/2023, 7:28 PMconfigureCache({
staleTTL: 100 // 0.1 seconds
});
hallowed-toothbrush-30835
06/23/2023, 7:32 PMhappy-autumn-40938
06/23/2023, 7:33 PM