Skip to content

Commit 099d747

Browse files
committed
Increase duration of memory cache
1 parent dcc4cfe commit 099d747

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/gitbook-v2/next.config.mjs

+9
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,17 @@
55
*/
66
const nextConfig = {
77
experimental: {
8+
// This is needed to throw "forbidden" when the api token expired during revalidation
89
authInterrupts: true,
10+
11+
// This is needed to use 'use cache'
912
useCache: true,
13+
14+
// Content is fully static, we can cache it in the session memory cache for a long time
15+
staleTimes: {
16+
dynamic: 3600, // 1 hour
17+
static: 3600, // 1 hour
18+
},
1019
},
1120

1221
env: {

0 commit comments

Comments
 (0)