Hi Izac,
• Auto refresh works with Server Sent Events (SSE) which only work if you're using a Proxied connection (a self-hosted GrowthBook Proxy instance, or soon available without additional infrastructure for all GrowthBook Cloud customers). Enabling auto-refresh with SSE allows us to push real-time (usually <1 sec) updates to subscribed clients. If you've hooked your front-end UI up to these updates, any feature updates will immediately take effect (re-render) on active web browser sessions. This also works in a back-end context (NodeJS), allowing you to respond to changes in real-time in your server code. For both front-end and back-end SSE updates, the local feature cache will also be force updated.
• As mentioned, you need to use the GrowthBook Proxy to enable these realtime feature updates. The Proxy handles the SSE updates, as well as provides a caching layer. Cloud customers will soon get all of these Proxy features by default without needing to spin up their own proxy instance.
• Without a proxy and SSE, feature changes will take effect on new requests, but may be subject to delays based on SDK-level cache (typically 60 seconds per client). You do have some ability to force refresh cache if desired by using the SDK's
refreshFeatures()
method (you could technically put this on an interval to simulate real-time updates, although it could get expensive based on the interval used).