-
-
Notifications
You must be signed in to change notification settings - Fork 39
Sitemap cache usage with _sitemap-urls.ts? #194
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
Comments
Hi, the sitemap is cached by default for 10 minutes using a SWR caching strategy. You can learn more here: https://nuxtseo.com/sitemap/guides/cache This may be of interest:
If you're saying that it's not clearing the cache after 10 minutes, and you're not prerendering it, then it may be a bug I need to look into, can you confirm. |
@harlan-zw Thanks for getting back, it is not in fact clearing the cache right now, I've made some changes 2 days ago, even did a redeploy on Netlify and I'm still seeing old data. Is there a method to forcefully clear the cache? (I checked the server endpoint, the cache there is updated, so the issue is indeed in the frontend/sitemap). |
Silly question, but are you sure you're not prerendering the sitemap? Is it possible to share a live URL? Also please provide the version you're using |
@harlan-zw How do I know for sure if I'm not pre-rendering, I'm hosting the project on Netlify, with the |
If you inspect the HTTP response headers it should give you details on the caching. If you provide the live URL i can help with this (feel free to DM me on discord if you want to keep it private). To try and debug you can also try disabling the caching by providing |
@harlan-zw Thanks for helping out, this is the live url: |
Definitely something broken here, current Age is |
@harlan-zw Is there a way to forcefully invalidate the cache now? Thanks! |
Hey @harlan-zw, I took a look at this, and it seems to be a challenge with Netlify. Could the problem be related to this topic? Go to Netlify Forum Post
My website vs. notflip's websiteThe request headers are defining the max-age as 0, but the notflip's website response is indicating 31536000 (Strict-Transport-Security = 1 year). So maybe we should fix the way the cache control is being injected |
Going to close this in favour of #288 (duplicate). |
Details
I'm using
_sitemap-urls.ts
to fetch dynamically created pages (using Directus CMS), now I see that the client deleted a page, but the sitemap is not updating, even though I have set the followingHow do I make sure that updates in the CMS are also reflected in the sitemap?
Thanks
The text was updated successfully, but these errors were encountered: