Metafields on locale pages (/ja, /en-es) are cached and return old values

Short description of issue

Metafields on locale pages (/es-es, /ja) are cached and return old values

Link to Shopify Store

imou-store-1018.myshopify.com (/es-es), tkindg-nd.myshopify.com (/ja)

Reproduction steps

We set metafields on the Shop object level to track settings for our app. This is stored across multiple keys. The main ones in this case are the keys ‘settings’ and ‘selling_plans’. We set these keys when settings change so it happens infrequently.

It is not consistent but often times we will see that the metafields load old versions for a locale using path (/ja, /es-es) but we haven’t seen the subdomain version running into issues yet.

It happens frequently to the stores I’ve linked.

To recover from this we are forced to unset the metafield and then set it again. This is the only way for it to recover. Alternatively it does to have in some cases changed after a few days.

Additional info

In the screenshot you can see the updated_at key for the two paths is completely different. Setting the metafield multiple times doesn’t change the locale one.

What type of topic is this

Bug report

This is how we load the keys.

Looks like the screenshots I included in the post are missing but these are the settings on two different paths of the same website.

Hi @kartik-stoq

Is this caching issue only happening on markets/locales? ie: metafields update as expected on the default market?

Yes @Liam-Shopify that appears to be the case in all of them.