Is there a way to trigger the shipping rate cache to flush?
I can see in the documentation that the cache is flushed if any of certain parameters change (https://help.shopify.com/en/api/reference/shipping-and-fulfillment/carrierservice#server-side-cachin...) however what about situations out of these parameters? Such as a rate no longer being available after a certain time or other set of circumstances changing (within the 15 minute cache).
I'm not aware of any way the cache can be cleared manually outside of the alteration of the fields mentioned in the docs. It was likely designed this way because of flash sales or weekends such as Black Friday/Cyber Monday, the load on both Shopify and any associated CarrierService can be pretty substantial even with caching.
If there was a rate that you served with a time-based expiry, I would suggest to stop serving that rate 15 minutes ahead of time so that caching is no longer a concern.
Thanks for the reply! That's understandable.
It's a shame because one of the things we're looking to do is provide different rates based on the delivery date chosen in a calendar, without being able to clear the cache this basically impossible because there's no realistic place to put a delivery date in the order or product details that would clear the shipping rate cache if changed, thus you always get the same rate for 15 minutes no matter how many times you change the delivery date.
Unless you are aware of any other ways around this that perhaps aren't in the documentation?
|3 hours ago|
|4 hours ago|