Hi is it possible to update feature definition wit...
# announcements
h
Hi is it possible to update feature definition without using webhooks?
f
how do you mean update? are you caching the features json?
h
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
you can update the context at any time with another call to
setFeatures()
h
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
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
Poll means to use setinterval?
Polling and TTL is refreshing even there is not change is features.
f
Yasir, perhaps we can meet and help you with the problem: https://calendly.com/growthbook