My carrier service API crashed. We got it running again, but customers are still getting the error because you are CACHING the error! You must provide a way to purge cache! If the customer tries to checkout with the same items in their cart and same address they get the "service unavailable" message because you are caching the failure!
Hello Max. Thanks for reporting this issue.
We have done some investigation and identified an area where we are being overly aggressive with caching shipping rates in some error cases. We will roll out a change to mitigate this problem today. Any cached rate lookups will expire within a matter of hours and you should not encounter this problem going forward.
Here's what happens: we have a custom shopify app for calculating shipping rates for Japan Post. This is a non-commercial, private app which we developed for our shop. We may release it commercially soon. Presently if this app has some downtime for any reason (i.e. server outage, planned maintenance, etc.) then (of course) for that period no rates will be returned to our shopify customers. The problem is that Shopify caches those empty API responses, so once the app is available again, customers will receive the cached, empty responses (that is, they receive no rates).
So let's say we have several customers who try to checkout while the app is down. Shopify will cache the unique combination of cart (contents) and customer address. If the app is down they will get an error (no shipping rates available), then when the app is online again, they will get the same error (because it's now cached) UNLESS they modify their cart of address.
Since it's hard for us to actually reach out to customers and tell them "oh you just need to change one letter in your address, like adding a '.' after 'AVE' , then you'll get shipping rates' because we have limited ability to identify and reach out to them in real-time . . . so we just lose those sales, because of this caching problem.
Hope you can appreciate the problem and do something to fix it. Let me know if it's not clear what's happening and I'll create a video demo to walk you through it.
when calling a carrier service app, the shop address is also passed. I thought I should be able to change my shop address in order to circumvent the caching (because in theory the caching should only cache the same API call. right?, but it didn't work. Can you explain why changing the shop address doesn't do the trick?
I asked a senior developer that has used the aforementioned API for many Shopify sites.
Contact me if you need further clarification or assistance.
And Kevin, will be great if you can respond to my question above.
We deployed a change the same day as I commented above which correct the problem of caching rate lookup errors. Thank you again for alerting us to this issue. The TTL on any rate lookups you had would all have expired by the the end of the day.
To clarify current behaviour: Any rate lookups that result in either an error or empty response are cached for under a minute, simply to debounce identical requests. Any rate lookups with identical request values that result in a successful response are cached for a few hours.