busy-window-96391
08/26/2025, 10:50 AMcalm-dog-24239
08/28/2025, 8:22 AMsdk.feature("test-flag").on
did not trigger a request to the server — it relied solely on locally cached or preloaded data.
Now, the SDK follows a stale-while-revalidate approach. This means that if the TTL has expired, the first call to feature.on
will return the stale value, but it will also trigger a background fetch. The next call will then return the updated result.
This method is indeed the correct and intended behavior. However, we noticed that some changes introduced after the initial release of this feature unintentionally broke the TTL logic. At the moment, the ttlSeconds
value is not passed correctly and always defaults to 60s
. Additionally, other methods (such as isOn
) are not working as expected.
That’s why we created a PR that fixes this logic. Once that PR is released, everything will work exactly as you described.