Skip to content

Commit 4e4fe42

Browse files
fix: make regional cache hits bypass the tagCache
When the `regional-cache` is used and it finds an entry, there's no need to then interact with the `tagCache`, so the changes here add `shouldBypassTagCache: true` to the cache response to avoid interactions with the tagCache (which can slow down response times)
1 parent ebe7249 commit 4e4fe42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/cloudflare/src/api/overrides/incremental-cache/regional-cache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class RegionalCache implements IncrementalCache {
103103
this.putToCache({ key, cacheType, entry: { value, lastModified } })
104104
);
105105

106-
return { value, lastModified };
106+
return { value, lastModified, shouldBypassTagCache: true };
107107
} catch (e) {
108108
error("Failed to get from regional cache", e);
109109
return null;

0 commit comments

Comments
 (0)