File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,12 @@ export class CacheObjectStub {
7777 await Promise . all (
7878 allLocations . map ( async ( locationId ) => {
7979 const groupId = getCacheObjectIdName ( locationId , this . tag ) ;
80- const cacheGroup = this . doNamespace . get ( this . doNamespace . idFromName ( groupId ) ) ;
80+ const cacheGroup = this . doNamespace . get ( this . doNamespace . idFromName ( groupId ) , {
81+ // Initialize the object with a locaiton hint,
82+ // as we might want to purge all locations before the object is created.
83+ // https://developers.cloudflare.com/durable-objects/reference/data-location/
84+ locationHint : doLocationHints [ this . locationId ] ,
85+ } ) ;
8186 const locationkeys = await cacheGroup . purge ( ) ;
8287 locationkeys . forEach ( ( key ) => keys . add ( key ) ) ;
8388 } ) ,
You can’t perform that action at this time.
0 commit comments