Skip to content

Commit

Permalink
lower ttl
Browse files Browse the repository at this point in the history
  • Loading branch information
gregrickaby committed Feb 8, 2024
1 parent a3d3af0 commit 68299ba
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,13 @@ export async function fetchToken(): Promise<TokenProps> {
headers: {
'Content-Type': 'application/json',
'User-Agent': config.userAgent,
'Cache-Control': 'no-cache',
Authorization: `Basic ${btoa(
`${process.env.REDDIT_CLIENT_ID}:${process.env.REDDIT_CLIENT_SECRET}`
)}`
},
next: {
tags: ['token'],
revalidate: 86400 // Reddit access tokens expire after 24 hours.
revalidate: config.cacheTtl
}
}
)
Expand Down

0 comments on commit 68299ba

Please sign in to comment.