This commit is contained in:
Linus Flood
2024-10-14 10:36:13 +02:00
parent 697d571ab2
commit a8f7c62f59

View File

@@ -36,13 +36,14 @@ export function getDefaultRequestHeaders(request: NextRequest) {
return headers
}
type ContentStackResponse = {
contentType: string | null
uid: string | null
expiresAt: number
}
const entryResponseCache: Map<string, ContentStackResponse> = new Map()
const entryResponseCache: Map<
string,
{
contentType: string | null
uid: string | null
expiresAt: number
}
> = new Map()
let size: number = 0
export const fetchAndCacheEntry = async (path: string, lang?: Lang) => {