diff --git a/packages/gitbook/src/lib/api.ts b/packages/gitbook/src/lib/api.ts index 6694a8dd22..701d7a97e9 100644 --- a/packages/gitbook/src/lib/api.ts +++ b/packages/gitbook/src/lib/api.ts @@ -242,7 +242,7 @@ export const getLatestOpenAPISpecVersionContent = cache({ * Resolve a URL to the content to render. */ export const getPublishedContentByUrl = cache({ - name: 'api.getPublishedContentByUrl.v4', + name: 'api.getPublishedContentByUrl.v5', tag: (url) => getCacheTagForURL(url), get: async ( url: string, @@ -267,6 +267,10 @@ export const getPublishedContentByUrl = cache({ const parsed = parseCacheResponse(response); + console.log( + `Parsed ttl: ${parsed.ttl} at ${Date.now()}, for ${'apiToken' in response.data ? response.data.apiToken : ''}` + ); + const data: PublishedContentWithCache = { ...response.data, cacheMaxAge: parsed.ttl,