I'm building a Shopify App and I got stuck as the app was behaving strangely.
I investigated the issue and I found out that saving a product with the Shopify API and then asking Shopify to read the just saved values still outputs outdated information.
Reading the product again after a few seconds outputs the true values of the saved product.
It seems Shopify is caching the query of a product and for a few seconds (with my tests the threshold seem to be 7 seconds) still replies with old data. Is this true?
In this case is there a way to tell Shopify to refresh the data of a product? For example in Ruby on Rails I could just use the ".reload" method on the object.
My problem is that if a user is using the Shopify website admin and updates a product rapidly - lets say it is entering updated stock quantity for different variants - the product-update webhook is called rapidly and the second webhook call doesn't read the changes made by the first webhook call.
Thanks!