rhythmic-chef-84815
06/29/2023, 8:11 AMfresh-football-47124
better-magician-65629
06/29/2023, 5:40 PMrhythmic-chef-84815
06/30/2023, 8:07 AMbetter-magician-65629
07/04/2023, 5:27 PMGrowthbook::FeatureRepository#fetch
call.
if you're using java, there's a method on the GBFeaturesRepository#onFeaturesRefresh that you can use to listen to updates to update your shared cache.
in the javascript SDK, there doesn't seem to be a way to subscribe to feature updates but i'll check with the rest of the team to confirm.rhythmic-chef-84815
07/06/2023, 7:31 AMfresh-football-47124
rhythmic-chef-84815
08/22/2023, 9:28 AMbetter-magician-65629
08/22/2023, 5:10 PMawait gb.loadFeatures({ autoRefresh: true });
rhythmic-chef-84815
08/24/2023, 7:43 AMconstructor(
@Inject(AB_TESTING_OPTIONS) private options: ABTestingOptions,
private abTestingIntegrationService: ABTestingIntegrationService,
private logger: LoggerService
) {
logger.setContext(ABTestingService.name);
setPolyfills({
// Required for Node 17 or earlier
fetch: fetch,
EventSource: EventSource
});
this.growthbook = new GrowthBook({
apiHost: '<https://cdn.growthbook.io>',
clientKey: this.options.growthbookSdkKey,
enableDevMode: true,
trackingCallback: this.trackingCallback.bind(this)
});
}
public async onApplicationBootstrap() {
await this.growthbook.loadFeatures({
autoRefresh: true,
timeout: 2000
});
}