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

标签 ios swift firebase firebase-remote-config

推送远程配置需要多长时间?我有以下代码,在网络上推送新更新后,它会继续打印 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/

相关文章:

android - React Native Android App 中 TextInput 下的意外行

ios - AVPlayer 视频重力定位?

swift - 以编程方式使 UICollectionViewController 不显示单元格

android - 尝试注册用户时出现错误

javascript - React 不会从 firebase 渲染数组值,并且数组的长度为 0,尽管控制台上有该值

ios - 将登录详细信息注入(inject) TwitterKit

ios - 如何在 Google MapView iOS 中设置固定标记位置

swift - 在上传到 Google Cloud 存储之前调整图像大小并压缩图像

ios - 在 Swift 中快速更新 UIView 背景颜色?

firebase - 如何在返回流的函数中获取当前用户