waitForReady

abstract suspend fun waitForReady(): ClientCacheState(source)

Waits for the client to reach the ready state, i.e. to complete initialization.

Ready state is reached as soon as the initial sync with the external cache (if any) completes. If this does not produce up-to-date config data, and the client is online (i.e. HTTP requests are allowed), the first config fetch operation is also awaited in Auto Polling mode before ready state is reported.

That is, reaching the ready state usually means the client is ready to evaluate feature flags and settings. However, please note that this is not guaranteed. In case of initialization failure or timeout, the internal cache may be empty or expired even after the ready state is reported. You can verify this by checking the return value.

Return

the state of the internal cache at the time the initialization was completed.