make ranking page many speedy
All checks were successful
deploy / deploy (push) Successful in 2m11s

This commit is contained in:
Lee
2023-10-23 18:09:16 +01:00
parent dc2d502dfa
commit bab5627c51
17 changed files with 245 additions and 241 deletions

View File

@ -23,7 +23,11 @@ export class FetchQueue {
);
}
const response = await fetch(url);
const response = await fetch(url, {
next: {
revalidate: 3600, // Keep the data for 1 hour, then fetch new data
},
});
if (response.status === 429) {
const hasRetryAfter = response.headers.has("retry-after");
let retryAfter =