Hello everybody hoping for quick response…going crazy on this.
I have create a worker that on first load is using fetch() to populate the page with some json data coming from a remote route in my worker
AND is calling from remote 3rd party.
When some activity occurs from somewhere else, the activity will update the 3rd party data and my kv stored data via a single meta data change(ie i have set a metadata field status will change from ‘pending’ to ‘accepted-live’). ANd in my response, all the metadata is shown.
Simple stuff! The issue is, i have created a reload button on the page that simply calls my init() function that is using fetch to re-call the same url. The remote 3rd party api will get refreshed…but my local one will not. I have to close the window and re-open the page to see the new data.
I am assuming i need to set something special in my worker in the response, but not sure what that is, (no-cache, no-storage ?) I have played with things but not seeming to get things workers. Is this an issue with using fetch on .dev and can be controlled when i move things to my own domain? I’m sure this is basic…but its a serious roadblock for me…going on 2 days racking my head.