Firebase RemoteConfig fetch 每次都在缓存过期后调用

Firebase RemoteConfig fetch calling each time not after cache expired

也许我遗漏了什么,但是 fetch() 难道不应该只在缓存值早于缓存值时才被调用吗?

从 activity 的 onCreate

调用此代码
firebaseRC = FirebaseRemoteConfig.getInstance()

firebaseRC.fetch(3600L). .addOnCompleteListener(this, new OnCompleteListener<Void>() {
            @Override
            public void onComplete(@NonNull Task<Void> task) {
                if (task.isSuccessful()) {
                    //THE TASK IS ALWAYS SUCCESSFUL
                    firebaseRC.activateFetched();
                }  
            }
        });

如果我连续几次在我的模拟器上启动该应用程序,每次都会成功完成提取。

仅当我的数据早于 3600 秒时,fetch 不应该真正成功完成吗?所以第二次启动应用程序,获取应该在没有 onComplete

的情况下完成

文档说:

Remote Config caches values locally after the first successful fetch. By default the cache expires after 12 hours, but you can change the cache expiration for a specific fetch by passing the desired cache expiration to the fetch method. If the values in the cache are older than the desired cache expiration, Remote Config will request fresh config values from the service. If your app requests fresh values using fetch several times, requests are throttled and your app is provided with cached values.

它没有说明 onComplete 将如何触发...我是否应该每次都使用 activateFetched(),因为它具有相同的值?

fetch() 的 API 文档说结果将来自缓存或服务器。它并没有说缓存的结果被认为是失败的。仅当无法为您提供任何结果时,提取才会失败,这意味着您的应用可能处于离线状态并且缓存中没有之前成功提取的值。