Hi, this is my first issue, I could not find duplicates but sorry in advance if it exists.
Also, thank you for a great plugin.
Allow for something like GATSBY_CONTENTFUL_OFFLINE=prefer which always uses cached data (if exists) in development
I'm working on a project with a pretty large amount of contentful data.
Having contentful data completely synced all the time is not a priority for my use case, so I would like a way to (at least attempt to) manually opt out of contentful re-sync whenever I add a dependency, change a gatsby-*.js file, etc.
It will considerably speed development time for me. Hope this is possible.
Thanks.
Hey @doronnac , thanks for the feature request!
This would actually be a Gatsby core feature, not specific to the contentful plugin, and this is not currently possible.
Right now, the entire cache for all plugins is invalidated if gatsby-*.js files or dependencies are changed, regardless of wether it's needed or not.
Work is currently being done to selectively invalidate the cache of only the plugins that need it, see https://github.com/gatsbyjs/gatsby/pull/8379.
Once that's merged though, it wont solve your problem. IMO we need a gatsby-node API for plugins to run logic to decide if their cache (or parts of their cache) should be invalidated.
@doronnac maybe then should help an external cache/proxy/vcr for your test setup?
something like the "famous" VCR ruby gem i found (but not tested):
Hmm looks interesting, but I don't see how it'll help with the slow startup time when cache is invalidated during gatsby develop
i read you fetching always all data again from Contentful
with the tools you can speed up the api calls - it comes from your local cache and goes not over the internet to Contentful (after the second time of an api call)
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鈥檚 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! 馃挭馃挏
Hey again!
It鈥檚 been 30 days since anything happened on this issue, so our friendly neighborhood robot (that鈥檚 me!) is going to close it.
Please keep in mind that I鈥檓 only a robot, so if I鈥檝e closed this issue in error, I鈥檓 HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.
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 again for being part of the Gatsby community! 馃挭馃挏