@@ -87,11 +87,18 @@ export function createDataFetcher(
8787 } ) ;
8888 } ,
8989 getRevisionPageMarkdown ( params ) {
90- return getRevisionPageMarkdown ( input , {
91- spaceId : params . spaceId ,
92- revisionId : params . revisionId ,
93- pageId : params . pageId ,
94- } ) ;
90+ return getRevisionPageMarkdown (
91+ input ,
92+ {
93+ spaceId : params . spaceId ,
94+ revisionId : params . revisionId ,
95+ pageId : params . pageId ,
96+ } ,
97+ // We pass the name of the function to distinguish between cache entries
98+ // By default Next only uses the arguments, the filename and the position of the function inside the file
99+ // By adding a dummy argument with the function name, we can change the order without breaking anything
100+ 'getRevisionPageMarkdown'
101+ ) ;
95102 } ,
96103 getRevisionPageDocument ( params ) {
97104 return getRevisionPageDocument (
@@ -318,7 +325,9 @@ const getRevision = cache(
318325const getRevisionPageMarkdown = cache (
319326 async (
320327 input : DataFetcherInput ,
321- params : { spaceId : string ; revisionId : string ; pageId : string }
328+ params : { spaceId : string ; revisionId : string ; pageId : string } ,
329+ // used only to bust the cache
330+ _functionName : string
322331 ) => {
323332 'use cache: remote' ;
324333 return wrapCacheDataFetcherError ( async ( ) => {
0 commit comments