refactor
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user