在 Firebase 远程配置中设置最小间隔和设置 fetch withExpirationDuration 有什么区别?

what is the difference between setting minimum interval and settting fetch withExpirationDuration in Firebase remote config?

here 中的文档说我必须像这样设置远程配置

let settings = RemoteConfigSettings()
settings.minimumFetchInterval = 0
remoteConfig.configSettings = settings

我假设上面的代码用于始终从远程获取数据(以避免 12 小时的等待,用于测试)。但我也找到了下面的代码来使用到期持续时间

获取值
    let fetchDuration: TimeInterval = 0

    remoteConfig.fetch(withExpirationDuration: fetchDuration) { (status, error) in

        if let error = error {
            // show the error
        } else {
            // do something
        }

    }

这两者有什么区别?哪个用于测试以避免等待 12 小时?

API documentation 关于 withExpirationDuration 的说法:

Override the (default or optionally set minimumFetchInterval property in FIRRemoteConfigSettings) minimumFetchInterval for only the current request, in seconds. Setting a value of 0 seconds will force a fetch to the backend.

所以它只是覆盖了你在设置中的任何内容。