-
Notifications
You must be signed in to change notification settings - Fork 87
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
Issue with cached data returned in production #806
Comments
Hey @acelletti! Thanks for reporting the issue, I see definitely you did a great investigation there already (and btw, welcome to Storyblok!) I see a couple of things here. Let's tackle them separately. Distributed cache implementationRelated to you point 1, for the cases you need a distributed cache implementation, you have 2 approaches to accomplish that:
Potential non-version cleaningRelated to your points 2 and 3, we might've found a bug that doesn't clean properly the cache version. We're investigating it and will keep you in the loop. Hope this helps for now. Let us know how it goes! |
Hey @acelletti, thanks for the detailed report! Point 2: I've created the PR #807 to fix this. The issue is actually intermittent because of a combination of factors, so we haven't spotted that earlier. With your input, we are completely getting rid of this issue. We'll merge soon the PR. Please keep us posted once you test it |
I am using the storyblok astro client (Version 4.0.5) and still have this problem with the following config:
. But I made the observation, that the cache update works once. After that no changes on any story is reflected on the site. |
Any updates on this? Working with pulling information from datasources and when changes are made to them, it is only reflected once then not again. Have the same setup as @ChristophKna above. |
I also have the same issue as @ChristophKna mentioned. Works first time but it never clears the cache version. |
Hi @acelletti thanks for reporting this, this should be solved by this upstream merge on the js-client #847. We need to wait for the js-client v6.10.0 bump to reach the nuxt module to test it |
Hi @acelletti could you please check by upgrading the nuxt module to https://github.com/storyblok/storyblok-nuxt/releases/tag/v6.0.13 ? Thanks |
@alvarosabu We have the same issue. After going all the code i found this and the other related cache bug tickets. I updated to storyblok-nuxt v6.0.13 (storyblok-js-client v6.10.1) but still have the problem. Seems it never executes the cacheResponse method which includes the check. |
I created a Stackblitz with a minimal app to reproduce the bug. https://stackblitz.com/~/github.com/mrsunshine/nuxt-storyblok-caching-bug?file=README.md |
We're experiencing the same issue as @mrsunshine. Are there any updates on this? |
@mrsunshine @CaprinaeWT we are working on better documenting the cache behavior and to allow more control from the client apps, in the meantime if you are blocked by this issue my suggestion is to get the This way you are sure to always get the latest content, because |
We have recently added Storyblok to our portal and upon launching the new Home page, we realised pretty quickly that updates to the home page that we published were not being picked up on our site.
We use Nuxt 3 with
@storyblok/nuxt
version 6.0.6 (latest).I have reached out to the help desk a few days ago and they suggested we use a webhook to trigger https://github.com/storyblok/storyblok-js-client#method-storyblokflushcache however this did not work for us as we had not switched the cache in production so it was set to
cache: { type: 'none' }
.I have added some debug logs to the
storyblok-js
client to see what was going on under the hood (attached).debug_logs.txt
From what I can see there are two issues that I would like to address:
We use several machines to host the website, how would we flush the cache for each one using webhooks? The only way that I can think of doing this is to use a shared cache like Redis, but could not find any plugin to do this in Storyblok.
The main issue seems to be that the value of CV is cached in memory under
cacheVersions
which is not reset by theflushCache
command. So effectively even tho we have no cache, the server keeps requesting the same CV which is outdated and there is no way to fix this but to restart the machine. This behavior does not seem to happen on the draft API as this seems to ignore the CV value sent by the client.What is the point of the
cache.clear
config? I have set it to both manual and auto for both draft & published and I can see no difference at all in the actual behavior of the client API.The text was updated successfully, but these errors were encountered: