refactor
This commit is contained in:
@@ -36,13 +36,14 @@ export function getDefaultRequestHeaders(request: NextRequest) {
|
|||||||
return headers
|
return headers
|
||||||
}
|
}
|
||||||
|
|
||||||
type ContentStackResponse = {
|
const entryResponseCache: Map<
|
||||||
contentType: string | null
|
string,
|
||||||
uid: string | null
|
{
|
||||||
expiresAt: number
|
contentType: string | null
|
||||||
}
|
uid: string | null
|
||||||
|
expiresAt: number
|
||||||
const entryResponseCache: Map<string, ContentStackResponse> = new Map()
|
}
|
||||||
|
> = new Map()
|
||||||
let size: number = 0
|
let size: number = 0
|
||||||
|
|
||||||
export const fetchAndCacheEntry = async (path: string, lang?: Lang) => {
|
export const fetchAndCacheEntry = async (path: string, lang?: Lang) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user