File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
packages/cloudflare/src/api/durable-objects Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,10 @@ export class DurableObjectQueueHandler extends DurableObject<CloudflareEnv> {
7777 // The route is already in a failed state, it will be retried later
7878 if ( this . routeInFailedState . has ( msg . MessageDeduplicationId ) ) return ;
7979
80+ // If the last success is newer than the last modified, it's likely that the regional cache is out of date
81+ // We don't need to revalidate in this case
82+ if ( this . checkSyncTable ( msg ) ) return ;
83+
8084 if ( this . ongoingRevalidations . size >= this . maxRevalidations ) {
8185 debug (
8286 `The maximum number of revalidations (${ this . maxRevalidations } ) is reached. Blocking until one of the revalidations finishes.`
@@ -183,7 +187,6 @@ export class DurableObjectQueueHandler extends DurableObject<CloudflareEnv> {
183187 for ( const event of allEventsToRetry ) {
184188 debug ( `Retrying revalidation for ${ event . msg . MessageBody . host } ${ event . msg . MessageBody . url } ` ) ;
185189 await this . executeRevalidation ( event . msg ) ;
186- this . routeInFailedState . delete ( event . msg . MessageDeduplicationId ) ;
187190 }
188191 }
189192
You can’t perform that action at this time.
0 commit comments