Is something up with Shopify Theme Caching?

Is something up with Shopify Theme Caching?

BIABAJay
Shopify Partner
15 0 19

I'm using themekit to upload my changes to my development theme. Every time I save it automatically uploads the changes and reload the page to see the changes. Now It seems to pick an upload and just cache it for 10 minutes at a time. It's not cached in my browser, because I've cleared the cache. Any ideas? I can't work on this theme if I can only see an update every 10 minutes after constantly reloading it. 

Replies 51 (51)

BSPark
Shopify Partner
3 0 5

Running into the same issue. It's tripled my working time.

PaulNewton
Shopify Partner
7722 678 1626

Generally I just rapidly refresh the page twice 

Caching has always been an issue with no clear guidance on bypassing it.

Sometimes it's been bad enough it's saner to just push code as a new theme.

A softer approach is making alternate templates, or toggling a change to trigger multiple themekit uploads.

When working on a section/snippet  there's also using the section rendering api to see if that gives the current changes and adding javascript for updating the page inline either in the theme as a utility , or as a userscript, or a devtools script.

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


rpbiwer
Shopify Partner
19 0 7

I've been having trouble with this over the last few days too. Also using themekit.

toaufik
Shopify Partner
1 0 1

Facing same issue. 

Kodence
Shopify Partner
10 1 6

Same issue as well, it's nerve-wracking. This seems more like a bug...

KLGeiger
Shopify Partner
13 0 8

I'm having same issue, I'm actively developing on a dev store, and it takes up to 1.5 minutes for me to see new code. Multiple F5s, and manually clearing browser cache does not solve the problem. I noticed it starting a 2-3 days ago. REALLY ANNOYING 😞  Any other tips to work around this?

Not every thing is #000000 and #ffffff

BIABAJay
Shopify Partner
15 0 19

Shopify support has just replied with this message.

 

As discussed, I followed up with our development team regarding this and explained that this issue persists when you are using theme kit to save changes made to your theme. They explained that the reason they are able to see the changes they made on your theme is because they aren't using theme kit to make changes to the theme. They further explained that changes made to the theme via theme kit is beyond their scope of support and recommended making the changes directly to your theme as a workaround. ”

Kodence
Shopify Partner
10 1 6

But the issue persist even by making changes directly to the theme, not just the theme kit.

BIABAJay
Shopify Partner
15 0 19

Oof, you’re right. Having the same issue using the code editor in the admin. 

matchupsolution
Tourist
6 0 6

yes, it has to do with any resource/liquid file in the edit code section...

 

this is ridiculous. 

 

how does a developer or designer rapidly prototype within Shopify?  where is the developer sandbox or playground to try code snippets or design out before deploying to production?  Making a one byte change and saving sometimes caches for 10-15 minutes or longer.  Sometimes making multiple changes thinking the change didn't deploy and then one of the version becomes Live but you don't know which one and now you're debugging even more!

 

I totally understand the purpose of caching in a PRODUCTION environment having worked on ecommerce platforms and creating many sites on top of other platforms.  Usually you export to at least a Test site or sandbox where the is little to no traffic and NO caching, sometimes testing on a UAT (universal acceptance test) site, and then deploy Live to production. 

 

I worked with Shopify chat support for half a day yesterday.  It took a long time for them to understand this issue.  They told me to put "nocache" at the end of the URL to solve the issue but no luck and turns out that is not an option.  After they discussed many times with other support people it turns out this is how Shopify is...ugh.  My dev time is tripled or more.  how does a developer function on Shopify?  

 

I tried taking the view source and making a static file so I could make changes locally but then Shopify is blocking many of the Include requests so we can't even try that option.

 

I think Shopify is mainly for drag and drop config driven web designers who don't code much, has to be.  No way someone who regularly codes can suffer through this.  I hope I am wrong.  How does a developer quickly make changes to prototype a new feature on Shopify?

PaulNewton
Shopify Partner
7722 678 1626

@matchupsolution wrote:

how does a developer or designer rapidly prototype within Shopify?  

 

how does a developer function on Shopify?  

 

No way someone who regularly codes can suffer through this.  I hope I am wrong.  How does a developer quickly make changes to prototype a new feature on Shopify?

 

 If working directly in a theme by slowing down and charging more money, or move to custom storefronts using hydrogen or other frameworks. Otherwise figure out a way to work outside of the theme environ using just pure html,css,and js then migrate that back to a liquid theme.

 

The dx(developer experience) for the online-sales channel has always been grit filled garbage do not expect that to change anytime soon.

 

Sometimes you have to in a perverse way treat web-dev on shopify themes like your compiling C code.

 Since there will be a delay between what you code and being able to test the actual results, try think through and implement as much as possible that's needed before uploading;  instead of iterating a few lines or logic blocks with a 10 minute long REPL.

 

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


Hielkio
Visitor
1 0 2

Same issue here ... it's almost impossible to make design changes. I really, really hope there will be a fix for this soon. Please make this high priority, because it frustrates developers / designers, but it also cost them a lot of useful time. I also want to mention that developers new to Shopify will definately change their mind and choose a different platform. I'm sure there are developers here who can't afford such time and effort and thus considering leaving Shopify. Point made 🙂

BTW. Explaining customers why implementing their wishes is also a big issue, which cost a lot of energy and time also. Everyone gets frustrated. It is not my intention to give a negative impression, or to blame the developers, but only to clarify how much impact this issue has. Go developers! Go! Make us happy 🙂

Peter1
Shopify Partner
132 0 36

Same for me, even changes made to my collections or products directly within the shopify admin take about 5 minutes to show up.  I'd love a response from Shopify here.

RanaPartap
Shopify Partner
7 0 2

Yea same issue.

Its frustating,

has to refresh refresh and wait.

Bang Bang ufffff. 

RanaPartap
Shopify Partner
7 0 2

Yeas same issue

mehedihasanziku
Visitor
3 0 4

What's happened suddenly? theme doesn't matter, but pages cached for longer time, and we are not seeing changes in realtime after doing theme edit, this is very frustrating for dev.


Shopify should look at this issue, i have this issue since last night, not sure if it's there from more days back, and still it's not fixed.

Shopify cache system showing always "x-cache:hit" doesn't making sense, they need to overcome this issue as soon as possible, it's hard to troubleshoot something in theme with such issue

Please check with high priority Shopify Dev Team

KaristonStefane
Shopify Partner
2 0 3

Here too, I am having the same problem. What I'm doing is closing the theme preview and opening it again, clearing the cache, but it's really annoying to have to do this all the time.

RanaPartap
Shopify Partner
7 0 2

what can we do on live theme 🤣

Peter1
Shopify Partner
132 0 36

I don't know if anyone else is having this issue but when I make changes to a page or a theme file, I see the changes right away in shopify's online theme editor.

 

When I make a change to an asset (example: style.css.liquid file), I don't see the changes at all on my live theme however they do show up right away in the online theme editor but it also says that there are no recent changes even though the change is there.

 

All that to say that when I refresh my browser, it still doesn't show the changes.

 

 

Theme file:

Peter1_1-1690897406275.png

 

Css File:

Peter1_2-1690897433007.png

 

 

 

KLGeiger
Shopify Partner
13 0 8

FWIW I raised this with plus support -- the answer I received:

 

Since we've noticed the high volume of same concern, this has been raised already with our developers. They are working on it as of the moment, we are hoping for it to be resolved as soon as possible. Just to set proper expectation, we don't have the exact time frame yet as to when this will be resolved completely. We will update you once we have an update on this incident. 
 
I will be asking for your understanding and patience. 

Not every thing is #000000 and #ffffff
LetsGetDigital
Shopify Partner
56 0 57

What a joke. They really had you there didn't they? Here we are in October 2024 and they have done sweet fa about it. This is such a familiar behaviour by Shopify at this point. They care about us about as much as Google, Meta, Amazon, etc do. i.e. zero. Requesting anything is simply a waste of breath.

Let's Get Digital (dot net)

CKO_Digital
Shopify Partner
5 0 4

Just posting to bring more attention to the issue. Shopify support is outsourced now and even with a plus store, I can't get ahold of anyone that can even understand me when I spell the name of the store out much less deal with a technical issue which is a major downfall for support in general.  I'm sure glad they spent all their time on the summer update instead of making the main product actually work.  There is literally no way to build a store our when the caching is holding it the last update for up to 5 minutes.  The only work around I have found is injecting styles directly into the header which is super super annoying.  Shopify Devs, jump on this, you are killing our ability to launch new stores or improve current ones and your going to lose your precious credit card fees from lost sales. 

DarrenSG
Shopify Partner
2 0 7

Personally I didn't have this issue until 2 days ago.

But now the cache time just seems to be forever!

Only affects `assets` files. `.liquid` files under templates works fine.

Peter1
Shopify Partner
132 0 36

It seems to have gotten worse, I made a change to my css this morning and 8 hours later, it still doesn't show up.  The css file definitely updated since I see the change I made within shopify's admin.  Man this is frustrating.

CKO_Digital
Shopify Partner
5 0 4

Hopefully this means they are working on it, but I'm surprised about how little attention this getting to be honest.

LetsGetDigital
Shopify Partner
56 0 57

and here we are in October 2024.... so glad I didn't hold my breath! LOL

Let's Get Digital (dot net)

michaeldoxsey
Shopify Partner
10 0 1

This is now a known issue affecting all of the .js.liquid and .css.liquid pre-processed files (at a minimum).

Shopify is working on a fix.

 

 

ryan99
Shopify Partner
32 3 13

Where can we see the status of the fix? It seems to be a week in now and still affecting our dev themes. It's almost impossible to get any work done in this state.

michaeldoxsey
Shopify Partner
10 0 1

They said there was no place to track the fix or to get an update. They only gave me the link to this thread. Its really frustrating and is affecting all Shopify Plus sites.

LetsGetDigital
Shopify Partner
56 0 57

aaaand then? 😛 

Let's Get Digital (dot net)

iolo72
Shopify Partner
31 1 4

@BIABAJay As a workaround, if you rename your file to something else then revert back to the original, it seems to load the latest saved one. I was having an issue with theme.js not updating on CDN, and when I renamed it to theme2.js then change it back it loaded the latest changes.

Peter1
Shopify Partner
132 0 36

Seems to have been fixed for me.  Anyone else?

matchupsolution
Tourist
6 0 6
Nope.  Still occurs...  Save, go get another cup of coffee, hope cache clears after a few minutes... repeat
Am I missing something?  How does a developer or a graphic designer rapidly prototype and try out changes on Shopify?  Or Shopify doesn't support a sandbox or test site to try out changes before Deploying/Saving to Production?
KLGeiger
Shopify Partner
13 0 8

It's been fixed for me since I contacted support and put in a ticket over a week ago. Weird, I thought the fix would be universal for everyone.

Not every thing is #000000 and #ffffff
matchupsolution
Tourist
6 0 6

I/we would love to know what the fix is!  What was the fix?

 

Support told me to Duplicate the site we are working with and Save to this site.  However, since it uses the exact same URL (uses a cookie to know it is on a copy of the Theme) I believe it is also considered a Production site that also has the same caching issues.  The cached resources is still an issue for the main Theme's production site as well as the Duplicated sites...

Peter1
Shopify Partner
132 0 36

It's been working fine for me, all I can say is to make sure that you're running the latest version of theme kit.  For me, I wasn't able to update theme kit until I updated ruby on my Mac.  Not sure if this is helpful but it's worth a shot.

matchupsolution
Tourist
6 0 6
I am not sure what a theme builder (theme kit) and UI resources (CSS, JavaScript, HTML) has anything to do with server side caching.
This issue has to do with Shopify's practices of caching resources on the server side.  For Production, great!  For Development, Testing, Designing, and prototyping...not so much...
PaulNewton
Shopify Partner
7722 678 1626

Note that duplicating a store to a dev store is a shopify Plus only feature.

 

If instead by "duplicating a store" they meant duplicating a theme that tends to solve very little if cache is being troublesome.

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


matchupsolution
Tourist
6 0 6

Thanks for that @PaulNewton.  Is this issue a non-issue with a Plus license?  I doubt it.  

 

I am still having this cumbersome issue that is doubling my dev time since we have to wait for the files to refresh from the server-side...

 

I have found some success with Saving...waiting a few seconds... making a small change like a new line... Saving again.... waiting a few seconds... and then refreshing... and sometimes that works.  What a dev process!

 

Any update or explanation Shopify?

gerardm
Shopify Partner
4 0 4

Just adding on more so they do something about this. I have been dealing with this problem for months. I don't have issues with it picking up new liquid or css files -- I do however with JS files and constantly have to delete then resave the file I'm working on from the assets folder to get it to turn over. It's especially bad with xx[.bundle].js files

 

It has nearly doubled my dev time.

krsmas
Shopify Partner
2 0 1

Also having this issue with .js files. They are being uploaded to the theme, but are not updated in the preview.

 

This is a fundamental part of your product, how do you miss this?

idango
Shopify Partner
16 0 3

Same with theme app extensions

phdawgy
Tourist
4 0 1

this error is a nightmare... using ella theme and this is painful... laptop can't get rid of a style from over 2 weeks ago and 50+ changes later ... still showing old styles from the banner and colors... .

ajobi
Tourist
3 0 2

This is incredibly frustrating. I came back after 24 hours and I still couldn't see my local changes...

carmar
Visitor
1 0 1

is there a fix for this yet? code is correct in the theme editor and customizer, but not updated in the browser preview. cleared cache, tried multiple browsers, etc. issue still persists and timing is inconsistent. 

LetsGetDigital
Shopify Partner
56 0 57

Its a joke mate. This thread started in July 2023 and here we are in October 2024. There have been 9,467 views at this point and 45 replies. Does anyone at Shopify care? Of course not, clearly. I believe their attitude is "this is how our platform 'works', if you don't like it, go elsewhere - we don't care - we're a 100 billion dollar company". It's a familiar attitude with these huge corporations.

Let's Get Digital (dot net)

ampsy
Shopify Partner
3 0 0

I used to work with NetSuite's out of the box website Suitecommerce Advanced.  They had a button in the admin that would allow you to clear CDN cache. They limited the amount of uses, but I never reached it.  It was very useful and I think Shopify would be doing us a solid if they added something similar (though, it seems like a deeper solution is warranted).  I switched over to using the CLI/GitHub setup for Themes and I'm still getting caching issues. I have to say that it got much worse when we upgraded from a 1.0 theme to a 2.0 theme.  This slows me down so much and it's been an issue long enough that I've considered moving away from Shopify work.

ajcadoo
Visitor
1 0 0

Is there any workaround? If shopify engineering DGAF then so be it, but a workaround would be appreciated.

LetsGetDigital
Shopify Partner
56 0 57

here we are a year and a half later aaaannnnnd...?

Let's Get Digital (dot net)