Skip to content
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

How to disable cache for SSG globally using npm run generate? #55

Closed
katerlouis opened this issue Jun 23, 2021 · 4 comments
Closed

How to disable cache for SSG globally using npm run generate? #55

katerlouis opened this issue Jun 23, 2021 · 4 comments

Comments

@katerlouis
Copy link

Since I'm building a static site with npm run generate, caching is pointless and just hindering my development flow.
I've read about cacheProvider: 'none' here: storyblok/storyblok-js-client#10

But this is not working for me. I still get cached content in my dev server.
The only thing that's working for me is very unconvenient.

const result = await $storyapi.get(`cdn/stories/articles/${route.params.slug}`, {
  cv: +new Date(), 
});

having to provide a cv prop for every request is really bothersome.

@marvinhuebner
Copy link

I have the same problem just now. Cache seems to be quite strong on the dev server.

Sometimes I have to restart the dev server to get new data. Have you found a solution in the meantime?

@alvarosabu
Copy link
Contributor

I will close this due to inactivity. If you feel it should be reopened and it's still a pain point, feel free to re-open

@pixelmultiplo
Copy link

How closing this help? It's just wrong and making me switch to fetch.

@alvarosabu
Copy link
Contributor

Hi @marekmaurizio it was closed because there has been no activity since 2021. Most of the issues get solved in newer versions. So if it's still an issue feel free to re-open it with a reproduction link so we can prioritize it and make a fix if there is one.

Storyblok SDKs are open source, meaning that you can also contribute if you like to solve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants