Gatsby + wordpress + NetlifyPress not update data correct

netlify site name: elated-hoover-b36a93
netlify plugin: Gatsby cache
client side: gatsby v. 2.32.3, plugin: gatsby-source-wordpress: 4.0.1
server side: wordpress v 5.7.1, plugin NetlifyPress v: 1.1.1

I use in wordpress plugin NetlifyPress v: 1.1.1 for update changes,
when I change category text in wordpress and update it, in netlify run build, but after build I didn’t see my new changes, it display old changes, after running clear cache and deploy site it still show old changes.

Could you point us what are the old vs new differences?

this is title that I try to change:
" Music That Fit Every Occasion 18.4 YYYY"
in wordpress → Products → Categories → Music I change title to

and after build the title not updated

I’m not sure what’s causing this issue. Is it happening for all pages or any kind of change?

this happen only in categories

Are you sure the code is perfectly setup? Have you tried it locally?

yes I do, this is very strange because locally it works perfect

I found problem, I use the netlify plugin: Gatsby cache,
if I do after regular build “Clear cache and deploy site” build,
it update data.
Now another question, how to resolve this issue.

If the cache is causing the issue, you’d have to let go off it sadly. As far as I know, you can’t control what stays in cache.

this is problem, this decrease the build time to 50% , do you know another way to reduce build time ?

You can try incremental builds and see if it helps: Enable Gatsby Incremental Builds on Netlify

Other than that, there’s no way.

thanks, I will try it

1 Like

Maybe someone else found a solution for this problem? Without cache my build time is ~40min and with cache it only takes 3-4minutes…

I am using new Gatsby v4 + “gatsby-plugin-netlify”: “^4.0.0-next.0”, + “@netlify/plugin-gatsby”: “^2.0.0-beta”. When cache is cleared everything works fine.

And is it even possible to clean cache automatically after Wordpress data update?

You can certainly directly manipulate the cache during build - you can see from the shell script that controls the build where it is put in the build:

…but we don’t provide tech support on changing it - it’s up to you to experiment and decide what works or doesn’t. This plugin may help in that journey: GitHub - netlify-labs/netlify-plugin-debug-cache: Debug & verify the contents of your Netlify build cache

However, it sounds like perhaps some of the plugins you use might have bugs (or you might be using them in unexpeted ways :)) and you could try reporting them to the author(s) to see if they help? They all should have GitHub repos that accept bug reports, once you boil your use case down to a small one you can share with them…