Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How long for Firebase Remote Config to push?

How long does it take for a remote config to push? I have the following code, which continues to print false and the old value for at least a few minutes after pushing a new update on the web.

remoteConfig.fetchWithCompletionHandler { (status, error) -> Void in
    if (status == FIRRemoteConfigFetchStatus.Success) {
        print("Config fetched.")
        print(self.remoteConfig.activateFetched())
        print(self.remoteConfig.configValueForKey("my_key").stringValue)
    } else {
        print("Config not fetched.")
    }
}
like image 343
Will Avatar asked Mar 11 '23 02:03

Will


1 Answers

The default behavior is to cache for 12 hours, according to the documentation. The function

fetchWithExpirationDuration(expirationDuration: NSTimeInterval, completionHandler: FIRRemoteConfigFetchCompletion?)

specifies the cache duration. At first glance, I thought the duration was a timeout on the network request — in fact, it's a timeout on the cache. If you use this with a short duration, the values will reload as quickly as you set the cache to expire.

like image 158
Will Avatar answered Mar 21 '23 06:03

Will