Skip to content

Commit a3e1125

Browse files
authored
Hotfix for v1 crashes (#3139)
1 parent 4dae8ac commit a3e1125

File tree

1 file changed

+5
-1
lines changed
  • packages/gitbook/src/lib

1 file changed

+5
-1
lines changed

packages/gitbook/src/lib/api.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ export const getLatestOpenAPISpecVersionContent = cache({
242242
* Resolve a URL to the content to render.
243243
*/
244244
export const getPublishedContentByUrl = cache({
245-
name: 'api.getPublishedContentByUrl.v4',
245+
name: 'api.getPublishedContentByUrl.v5',
246246
tag: (url) => getCacheTagForURL(url),
247247
get: async (
248248
url: string,
@@ -267,6 +267,10 @@ export const getPublishedContentByUrl = cache({
267267

268268
const parsed = parseCacheResponse(response);
269269

270+
console.log(
271+
`Parsed ttl: ${parsed.ttl} at ${Date.now()}, for ${'apiToken' in response.data ? response.data.apiToken : '<no-token>'}`
272+
);
273+
270274
const data: PublishedContentWithCache = {
271275
...response.data,
272276
cacheMaxAge: parsed.ttl,

0 commit comments

Comments
 (0)