Does Bixby cache the requests on server?

做~自己de王妃 提交于 2019-12-02 02:35:52

Yes, requests are cached on the server. You can disable the cache if you wish.

For example,

let options = {
    cacheTime: 0
  };

let response = http.getUrl('https://my-capsule.com/api/search/', options);

See https://bixbydevelopers.com/dev/docs/reference/JavaScriptAPI/http#http-options for more options. No pun intended. :)

In addition to cacheTime provided by the client, the Server can sometimes provide additional directives (max-age and no-store or no-cache) in the Cache-Control header. When this occurs, this is what Bixby does:

  1. no-cache or no-store: Bixby will not cache anything. This will override the cacheTime variable provided by client.
  2. time of response + max-age < current time: Remove response from cache (even if client requested a longer cacheTime)
  3. time of response + cacheTime < current time: Remove response from cache (even if response provided a longer max-age)
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!