Revalidate doesn't work?
Answered
Small Münsterländer posted this in #help-forum
Small MünsterländerOP
I have a fetch request but it doesn't seem to expire? At leats when i refresh the page 10 mins later it doesn't revalidate. (The endpoint its hitting was online, now offline so is returning ECONNREFUSED)
In dev mode if it helps
In the .next fetch-cache folder
In dev mode if it helps
const res = await fetch(`http://localhost:3005/abc`, {
next: { revalidate: 30 * 1000 },
});In the .next fetch-cache folder
{
"kind": "FETCH",
"data": {
"headers": {
"connection": "keep-alive",
"content-length": "39",
"content-type": "application/json; charset=utf-8",
"date": "Thu, 04 Jan 2024 09:45:28 GMT",
"keep-alive": "timeout=5"
},
"body": "....",
"status": 200,
"url": "http://localhost:3005/abc"
},
"revalidate": 30000,
"tags": []
}5 Replies
@Ray you set 30000 second there so 10 mins isn't expire yet
Small MünsterländerOP
i thought it was in miliseconds ;-;
@Ray its second
Small MünsterländerOP
My bad :D