Closed oliverstreissi closed 1 year ago
Hey @oliverstreissi ! Sorry for the late reply, this issue is known. It is not caused by storyblok sdk, this is happening because of Next.js automatic caching. As the SDK uses fetch behind the scenes, Next.js caches the requests. Therefore by using a random cv makes the url new and the cache is not hit so get the updated content. Currently, there is no way to change the fetch parameters, but we are working on it and it should be fixed soon. Here is the pull request you can take a look at - https://github.com/storyblok/storyblok-js-client/pull/660 :)
cc - @fgiuliani
When I'm using this boilerplate I'm not getting up to date content with version set to "draft".
Expected Behavior
Should show up to date content.
Current Behavior
Seems like the content is cached, when I add
cv: new Date().getTime()
additionally to the SbStoriesParams in the fetchData() function of the page component, I'm getting the up to date content.Steps to Reproduce
version: "published"
or add the param mentioned above