Skip to content

Commit 7e2e64a

Browse files
committed
prettier
1 parent 23c3493 commit 7e2e64a

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

packages/cloudflare/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,4 @@
8181
"peerDependencies": {
8282
"wrangler": "catalog:"
8383
}
84-
}
84+
}

packages/cloudflare/src/api/do-sharded-tag-cache.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class ShardedD1TagCache implements NextModeTagCache {
1313
mode = "nextMode" as const;
1414
public readonly name = "sharded-d1-tag-cache";
1515

16-
constructor(private opts: ShardedD1TagCacheOptions = { numberOfShards: 4 }) { }
16+
constructor(private opts: ShardedD1TagCacheOptions = { numberOfShards: 4 }) {}
1717

1818
private getDurableObjectStub(shardId: string) {
1919
const durableObject = getCloudflareContext().env.NEXT_CACHE_D1_SHARDED;
@@ -25,7 +25,10 @@ class ShardedD1TagCache implements NextModeTagCache {
2525

2626
private generateShards(tags: string[]) {
2727
// For each tag, we generate a message group id
28-
const messageGroupIds = tags.map((tag) => ({ shardId: generateShardId(tag, this.opts.numberOfShards, "shard"), tag }));
28+
const messageGroupIds = tags.map((tag) => ({
29+
shardId: generateShardId(tag, this.opts.numberOfShards, "shard"),
30+
tag,
31+
}));
2932
// We group the tags by shard
3033
const shards = new Map<string, string[]>();
3134
for (const { shardId, tag } of messageGroupIds) {
@@ -63,7 +66,7 @@ class ShardedD1TagCache implements NextModeTagCache {
6366
const shardsResult = await Promise.all(
6467
Array.from(shards.entries()).map(async ([shardId, shardedTags]) => {
6568
const stub = this.getDurableObjectStub(shardId);
66-
return stub.hasBeenRevalidated(shardedTags, lastModified)
69+
return stub.hasBeenRevalidated(shardedTags, lastModified);
6770
})
6871
);
6972
return shardsResult.some((result) => result);

packages/cloudflare/src/api/durable-objects/sharded-tag-cache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class DOShardedTagCache extends DurableObject<CloudflareEnv> {
2121
lastModified ?? Date.now()
2222
)
2323
.one();
24-
console.log("Checking revalidation for tags", tags, result);
24+
console.log("Checking revalidation for tags", tags, result);
2525
return result.cnt > 0;
2626
}
2727

0 commit comments

Comments
 (0)