Increase GitHub fetch cache
This commit is contained in:
parent
8d8d4d7925
commit
c3c7d6858a
@ -20,9 +20,9 @@ const fetchGitHub = async (
|
|||||||
) => {
|
) => {
|
||||||
const data = await fetch(
|
const data = await fetch(
|
||||||
url,
|
url,
|
||||||
// Cache all results for 2 minutes to avoid rate limiting
|
// Cache all results for 5 minutes to avoid rate limiting
|
||||||
// GitHub API requests limited to 60 requests per hour
|
// GitHub API requests limited to 60 requests per hour
|
||||||
cacheRequest ? { next: { revalidate: 120 } } : undefined,
|
cacheRequest ? { next: { revalidate: 300 } } : undefined,
|
||||||
)
|
)
|
||||||
.then(response => response.json());
|
.then(response => response.json());
|
||||||
if ((data.message ?? '').includes(GITHUB_API_ERROR)) {
|
if ((data.message ?? '').includes(GITHUB_API_ERROR)) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user