gpt4 book ai didi

ios - Firebase Remote Config 推送多长时间?

转载 作者:可可西里 更新时间:2023-11-01 00:50:53 31 4
gpt4 key购买 nike

推送远程配置需要多长时间?我有以下代码,在网络上推送新更新后,它会继续打印 false 和旧值至少几分钟。

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.")
}
}

最佳答案

默认行为是缓存 12 小时,根据 the documentation .功能

fetchWithExpirationDuration(expirationDuration: NSTimeInterval, completionHandler: FIRRemoteConfigFetchCompletion?)

指定缓存持续时间。乍一看,我以为是网络请求超时——实际上是缓存超时。如果您在很短的时间内使用它,这些值将在您将缓存设置为过期时尽快重新加载。

关于ios - Firebase Remote Config 推送多长时间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39583550/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com