Skip to content

Commit 04fb7e2

Browse files
authored
Fix ISG cache revalidate (#4245)
1 parent fa77e2a commit 04fb7e2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

frontend/cache-handler.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ CacheHandler.onCreation(async () => {
7474

7575
return {
7676
handlers: [handler],
77+
ttl: {
78+
defaultStaleAge: 60 * 3,
79+
estimateExpireAge: (staleAge) => staleAge * 2,
80+
},
7781
};
7882
});
7983

frontend/src/components/page-handler/page-static-props.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,5 @@ export const getProps = async (
7979
};
8080

8181
export const getStaticProps: GetStaticProps = async (context: any) => {
82-
return getProps(context);
82+
return getProps(context, null, 60 * 3);
8383
};

0 commit comments

Comments
 (0)