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 @@ -76,6 +76,10 @@ export class DurableObjectQueueHandler extends DurableObject<CloudflareEnv> {
7676 // The route is already in a failed state, it will be retried later
7777 if ( this . routeInFailedState . has ( msg . MessageDeduplicationId ) ) return ;
7878
79+ // If the last success is newer than the last modified, it's likely that the regional cache is out of date
80+ // We don't need to revalidate in this case
81+ if ( this . checkSyncTable ( msg ) ) return ;
82+
7983 if ( this . ongoingRevalidations . size >= this . maxRevalidations ) {
8084 debug (
8185 `The maximum number of revalidations (${ this . maxRevalidations } ) is reached. Blocking until one of the revalidations finishes.`
@@ -180,7 +184,6 @@ export class DurableObjectQueueHandler extends DurableObject<CloudflareEnv> {
180184 for ( const event of allEventsToRetry ) {
181185 debug ( `Retrying revalidation for ${ event . msg . MessageBody . host } ${ event . msg . MessageBody . url } ` ) ;
182186 await this . executeRevalidation ( event . msg ) ;
183- this . routeInFailedState . delete ( event . msg . MessageDeduplicationId ) ;
184187 }
185188 }
186189
You can’t perform that action at this time.
0 commit comments