I’ve recently created a ‘blog’ which you can see here Travel The Globe. There’s two posts, when you got a post a route sends you to a Cloudflare worker which retrieves post data from workers kv and returns html for the post itself. Problem is if you go to the news page, click on one of the articles and then go back and click on a different one despite the url it will have the content of the first blog post instead of the second.
Long story short:
Going to Travel The Globe shows the ssr-and-testing-suite article
Going to Travel The Globe immedietly after shows the srr-and-testing-suite article again, no matter if you have cache disabled or reload and will only change to the right post after ~5-10 minutes.
I’ve done this but it doesn’t seem to help. Should I be using Edge Cache TTL and browser cache TTL because the lowest settings for those are 2 hours and 30 minutes respectively.
Interestingly enough giving it an invalid link like here: Travel The Globe correctly returns an error response. Is it possible workers KV is caching and returning the wrong things?
Not sure if you’ll ever see this but I’d like to say thank you so much @thomas4 I wasn’t being the most polite and you graciously gave your time to help me, Indeed my problem was that I was using a template for my HTML (const string HTML) and ‘duplicating’ that and using string interpolation to swap in blog values but the duplicate existed in global scope by accident and was presisting between sessions. Again thank you for your generousness