In my application all the utterances from Bixby are redirected to an action which makes an api call. This api call returns the response to Bixby for the user utterance. Recently I observed that if the user says the following: -
user says: - Add xyz to my cart
api response: - Would you like 2 of those?
user says: - Yes
api response: - Would you like to checkout?
user says: - Yes
Ideally now the request should come to my api and the user should be shown the checkout result page, but instead Bixby shows the user cached response and is shown the below response again: -
api response: - Would you like to checkout?
and the loop continues indefinitely. I wanted to know if this behaviour is expected? Is there a way we can skip the caching and send the request to the api endpoint to respond?
Yes, requests are cached on the server. You can disable the cache if you wish.
For example,
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
andno-store
orno-cache
) in theCache-Control
header. When this occurs, this is what Bixby does:no-cache
orno-store
: Bixby will not cache anything. This will override thecacheTime
variable provided by client.max-age
< current time: Remove response from cache (even if client requested a longercacheTime
)cacheTime
< current time: Remove response from cache (even if response provided a longermax-age
)