App metafields in theme app extension are cached in Liquid for several hours before refreshing

Hi everyone,

Recently I’ve noticed that app metafields inside a theme app extension are being cached in Liquid. When a metafield value changes, it sometimes takes several hours before the new value is reflected on the storefront.

E.g.

MyAppConfig.hide = {{ app.metafields.settings.hide | default: true, allow_false: true }};

This issue only started appearing in the past few days. Before that, metafield updates were reflected almost immediately.

Has anyone else experienced this caching problem with app metafields in theme app extensions? Is this an expected behavior change, or could it be a temporary issue on Shopify’s side?

Thanks in advance for any insights!

1 Like

Hey @Gordon_Kihn

I have not encountered this behaviour previously - but digging into this on my side now. Are you seeing this caching on all Shopify themes?

1 Like

Hi everyone, we’re experiencing exactly the same issue over the past few days, whereas before we never had this problem. We’ve observed it across different themes, so it doesn’t seem to be limited to a specific theme.

1 Like

Recently, two customers reported a bug in my app, and I just discovered the issue. It’s very easy to reproduce: when I first open a storefront page, then update a metafield and refresh the page, the changes don’t show up at all. Only after several hours, if I refresh the page again, the updates finally appear. This doesn’t seem to be related to any specific theme.

Is this only with app metafields or regular metafields too @Gordon_Kihn ? Can you share a sstore where this is happening?

So far, I’ve only found the issue occurring with app metafields, and I’m not sure if other metafields have the same problem.

https://www.modernmates.com/products/ivy-3-seat-l-shaped-chenille-light-green-sectional-sofa

This store had the same issue, but after a few hours the page refreshed and it’s fine now, unless the app metafield value is modified again.

I haven’t been able to replicate this myself - are you still seeing this @Gordon_Kihn ?

Yes, this is always reproducible. Sometimes when I release a new version of the theme app extension, it takes over half an hour for the update to propagate to the customer’s store. Other times, it’s because the customer has modified configurations within my app, but certain pages remain cached and refuse to refresh. For instance, I just discovered again that multiple pages for one customer are inconsistent—clearly due to caching. This time, it’s the metaobject content that’s being cached.

Page 1 ( Набір для фарбування волосся вдома серії ZEN 10 хвилин №5\1 Sinergy – Sinergy Cosmetics ):

Page 2(Набір для фарбування волосся вдома серії ZEN 10 хвилин №1\0 Sinergy – Sinergy Cosmetics):

The client modified the option template but cannot update certain pages. It is unclear how many hours it will take for the cache to refresh.

Hi, We’re experiencing the same with public general metafields.

Hi,
We are seeing the same issue with app metafields. We have done various tests and found that:

  • The issue is intermittent, it might happen at any time. We are seeing it a few times per day, happening for different shops.
  • We haven’t noticed any particular pattern, e.g. it appears that it might happen for any shop.
  • Typically the update takes less than one hour.
  • Sometimes the issue happens for only some geographical areas: e.g. the update is reflected in the storefront when it is loaded from Canada, but a merchant doesn’t see it when they load it from Europe.

We will be very grateful if resolving the issue gets prioritized by Shopify! This is hurting our users as we rely on app metafields for quite a bit of our functionality.

Any updates on this?

This issue is happening too many times for us in recent days.

@Liam-Shopify Is there any update?

We’re seeing this issue too with our app meta fields. Exactly the same thing. @Liam-Shopify I’ve sent you a loom with details on how to replicate it.

Hi, we’re also still experiencing this issue. Hoping there is a fix in the pipeline!

@Liam-Shopify this seems to be happening again today, the output from liquid is super behind

When a page is cached, adding a random parameter to the end of the URL will retrieve the uncached page, for example: ?v=1000000000. While this doesn’t solve the problem of customers seeing cached pages, it allows me to quickly confirm whether a issue is caused by caching.