https://www.growthbook.io/ logo
h

handsome-library-89124

07/08/2022, 9:12 AM
Hi is it possible to update feature definition without using webhooks?
f

fresh-football-47124

07/08/2022, 9:24 AM
how do you mean update? are you caching the features json?
h

handsome-library-89124

07/08/2022, 9:35 AM
No I mean if we setFeatures in GB constructor and after that I update some variation on GB dashboard then how it will effect in sampling? One option is to set feature again and in product code. But is there any other auto way?
f

fresh-football-47124

07/08/2022, 9:40 AM
you can update the context at any time with another call to
setFeatures()
h

handsome-library-89124

07/08/2022, 9:45 AM
but how I came to know there is some change in variations and needs to update context?
There are two options using API and webhooks, I am seeking something that we can do in SDK rather than doing in product side,
f

fresh-football-47124

07/08/2022, 10:08 AM
if you don't want to use webhooks, you could just Poll every x minutes, or adjust the TTL on your feature cache
I'd have to check the code to see if calling setFeatures is safe to call if there are no changes, it should be okay.
h

handsome-library-89124

07/08/2022, 10:14 AM
Poll means to use setinterval?
Polling and TTL is refreshing even there is not change is features.
f

fresh-football-47124

07/08/2022, 3:34 PM
Yasir, perhaps we can meet and help you with the problem: https://calendly.com/growthbook
7 Views