https://www.growthbook.io/ logo
#give-feedback
Title
# give-feedback
b

bitter-advantage-42714

08/12/2023, 12:23 AM
Hello, everyone! Could anyone please help me out with the following problem? Problem Statement: The following use case leaves users with an outdated feature flag value and no built-in way to refresh automatically. 1. A feature flag is turned off. 2. The app loads and caches the feature flag as off 3. The feature flag is turned on 4. The user loads the app using the same browser within the cache stale time limit. 5. The SDK won't fetch the state of the feature flags, as they are not stale by the time we call the
loadFeatures()
method when first loading the app. 6. There's no subsequent or initial fetch request or SSE subscription. We expect the SDK to automatically fetch the state of the features once the cache goes stale. Please correct my expectations if this differs from the intended behavior or if our setup needs something else. Setup: • @growthbook/growthbook-react • React 18 • Calling
loadFeatures()
with no parameters • Self-hosted Growthbook platform • SSE enabled through HTTP response headers • Simple setup with just 1 feature flag, no experiments yet I'm aware that we can refresh the features ourselves. If this is the intended behavior, I am considering refreshing the features once the cache becomes stale or upon page navigation. Please feel free to suggest other methods for solving this problem. Thanks!
h

helpful-application-7107

08/14/2023, 4:26 PM
I believe the GrowthBook Proxy may solve your problems "Automatic cache invalidation when features change in GrowthBook (using WebHooks)"
14 Views