Skip to content

Commit dffe4e1

Browse files
authored
[cloudflare]: add option to persist missing tags in regional cache (#172)
Co-authored-by: Nicolas Dorseuil <nicolas@gitbook.io>
1 parent 895e846 commit dffe4e1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pages/cloudflare/caching.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ export default defineCloudflareConfig({
198198
baseShardSize: 12,
199199
regionalCache: true, // Enable regional cache to reduce the load on the DOs
200200
regionalCacheTtlSec: 5, // The TTL for the regional cache
201+
regionalCacheDangerouslyPersistMissingTags: true, // Enable this to persist missing tags in the regional cache
201202
shardReplication: {
202203
numberOfSoftReplicas: 4,
203204
numberOfHardReplicas: 2,
@@ -661,6 +662,7 @@ doShardedTagCache takes the following options:
661662
- `baseShardSize`: The number of shards to use for the cache. The more shards you have, the more evenly the cache will be distributed across the shards. The default is 4. Soft (internal next tags used for `revalidatePath`) and hard tags (the ones you define in your app) will be split in different shards
662663
- `regionalCache`: Whether to use regional cache for the cache. The default is false. This option is useful when you want to reduce the stress on the durable object
663664
- `regionalCacheTtlSec`: The TTL for the regional cache. The default is 5 seconds. Increasing this value will increase the time it takes for the cache to be invalidated across regions
665+
- `regionalCacheDangerouslyPersistMissingTags`: This option allows you to persist missing tags in the regional cache. Without this option, only tags that have been revalidated at least once will be persisted in the regional cache. This option should only be used if you also purge the cache using the [Cache Purge component](#automatic-cache-purge) (or any similar methods). It is disabled by default.
664666
- `shardReplication`: Enable replicating the Shard. Shard replication will duplicate each shards into replicas to spread the load even more
665667
- `numberOfSoftReplicas`: Number of replicas for the soft tag shards
666668
- `numberOfHardReplicas`: Number of replicas for the hard tag shards

0 commit comments

Comments
 (0)