-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wordpress and gatsby cache/refesh wordpress content #18040
Comments
@nelsonmiew i'm inclined to believe that you're using gatsby with the appropriate plugin Feel free to provide feedback so that we can close this issue or continue to work on it until we find a suitable solution. |
@jonniebigodes I'm having this same issue. Currently, the workaround is just to add |
@DmacTorstar from what i remember this was introduced to address this type of issue, it's a bit cumbersome i understand, but when it was added, it was to allow plugins to fetch content like this one and other sources. Fetching the data at every page load would defeat a bit the purpose of the plugin. I think a better approach would probably be refetch at regular intervals something like |
@jonniebigodes Yes I think its a step in the right direction. Having a refresh interval would be good, but a manual way to do it would be great also while developing. In production, there is much less of a need to refresh the data so often. But during development, even 60 seconds is kind of a long time when you are going back and forth editing the data. |
@DmacTorstar the refresh interval would be applied to development mode. For production mode i believe the safe bet would be the de facto stance on how gatsby does it. As it's really hard for gatsby to know what changed and that could lead to more bugs and inconsistencies in the data. |
Just been playing with the |
By the way, I'm using refresh from my wordpress theme like so:
|
After some investigation last night it seems that Gatsby (maybe this is the responsibility of
I've only tested this with removing pages/posts from Wordpress - so not sure how it'd adapt to other node types - but I'm thinking that shouldn't Gatsby be doing this internally? |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open! As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing! Thanks for being a part of the Gatsby community! 💪💜 |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
Hey again! It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Thanks again for being part of the Gatsby community! 💪💜 |
This is what I have in my
|
This is perfect, however what would you do in production when you want the gatsby front-end to rebuild on wordpress changes? I've not found an answer anywhere for this. :( |
Well, I have hosted my project in Netlify. It provides a link to rebuild the entire website. You can use the code from @Tasemu (not tested yet!) |
Hello,
I'm trying to build a gatsby solution with Wordpress CMS content.
When I update Posts on WordPress, i need to restart the gatsby server to get new content on gatsby solution.
What's the best solution to keep content updated on frontend gatsby? thanks.
The text was updated successfully, but these errors were encountered: