Skip to content

Commit

Permalink
Merge branch 'main' into bump-cache-key-getPublishedContentByUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
taranvohra committed Sep 30, 2024
2 parents 365c9a7 + a69ff27 commit d0296b9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/cache-do/src/CacheObjectStub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,12 @@ export class CacheObjectStub {
await Promise.all(
allLocations.map(async (locationId) => {
const groupId = getCacheObjectIdName(locationId, this.tag);
const cacheGroup = this.doNamespace.get(this.doNamespace.idFromName(groupId));
const cacheGroup = this.doNamespace.get(this.doNamespace.idFromName(groupId), {
// Initialize the object with a locaiton hint,
// as we might want to purge all locations before the object is created.
// https://developers.cloudflare.com/durable-objects/reference/data-location/
locationHint: doLocationHints[this.locationId],
});
const locationkeys = await cacheGroup.purge();
locationkeys.forEach((key) => keys.add(key));
}),
Expand Down

0 comments on commit d0296b9

Please sign in to comment.