Google Cloud Endpoint是否在本地缓存数据

时间:2022-12-27 20:19:23

I am using Google Cloud Endpoint with an android app. Do I have to explicitly cache data that I mean to reuse? Or does the endpoint store data for me so that the same call twice in a row pull from a local cache? If it's not done automatically, is there a setting I can use?

我正在使用带有Android应用程序的Google Cloud Endpoint。我是否必须显式缓存我要重用的数据?或者端点是否为我存储数据,以便连续两次从本地缓存中提取相同的调用?如果它没有自动完成,是否有我可以使用的设置?

If the question is still not clear, here is what I mean. Say I query my server for common dogs in america and then display the list in my DogActivity. If I then move away from that activity with finish() or by destroying it, if you will: The next time I return to my DogActivity and query my endpoint, does it call the server anew or is the data pulled from local cache by the endpoint?

如果问题仍然不明确,这就是我的意思。假设我在美国查询我的服务器以查找普通狗,然后在我的DogActivity中显示该列表。如果我然后使用finish()或通过销毁它来远离该活动,如果你愿意:下次我回到我的DogActivity并查询我的端点时,它是否重新调用服务器或者是否从本地缓存中提取数据终点?

1 个解决方案

#1


0  

A built int Cache is not implemented on endpoint generated libs (would be a cool feature to request though). So any info you retrieve will be lost unless you explicitly store it yourself.

在端点生成的lib上没有实现构建的int Cache(尽管如此,这将是一个很酷的功能)。因此,除非您自己明确存储,否则您检索的任何信息都将丢失。

#1


0  

A built int Cache is not implemented on endpoint generated libs (would be a cool feature to request though). So any info you retrieve will be lost unless you explicitly store it yourself.

在端点生成的lib上没有实现构建的int Cache(尽管如此,这将是一个很酷的功能)。因此,除非您自己明确存储,否则您检索的任何信息都将丢失。