@@ -12,42 +12,42 @@ declare global {
12
12
// Default to "production"
13
13
NEXTJS_ENV ?: string ;
14
14
15
- // KV used for the incremental cache
16
- NEXT_CACHE_WORKERS_KV ?: KVNamespace ;
17
- // D1 db used for the tag cache
18
- NEXT_CACHE_D1 ?: D1Database ;
19
- // D1 table to use for the tag cache for the tag/path mapping
20
- NEXT_CACHE_D1_TAGS_TABLE ?: string ;
21
- // D1 table to use for the tag cache for storing the tag and their associated revalidation times
22
- NEXT_CACHE_D1_REVALIDATIONS_TABLE ?: string ;
23
15
// Service binding for the worker itself to be able to call itself from within the worker
24
- NEXT_CACHE_REVALIDATION_WORKER ?: Service ;
16
+ WORKER_SELF_REFERENCE ?: Service ;
17
+
18
+ // KV used for the incremental cache
19
+ NEXT_INC_CACHE_KV ?: KVNamespace ;
20
+
25
21
// R2 bucket used for the incremental cache
26
- NEXT_CACHE_R2_BUCKET ?: R2Bucket ;
22
+ NEXT_INC_CACHE_R2_BUCKET ?: R2Bucket ;
27
23
// Prefix used for the R2 incremental cache bucket
28
- NEXT_CACHE_R2_PREFIX ?: string ;
29
- // Durable Object namespace to use for the durable object queue handler
30
- NEXT_CACHE_REVALIDATION_DURABLE_OBJECT ?: DurableObjectNamespace < DurableObjectQueueHandler > ;
24
+ NEXT_INC_CACHE_R2_PREFIX ?: string ;
25
+
26
+ // D1 db used for the tag cache
27
+ NEXT_TAG_CACHE_D1 ?: D1Database ;
28
+
31
29
// Durables object namespace to use for the sharded tag cache
32
- NEXT_CACHE_DO_SHARDED ?: DurableObjectNamespace < DOShardedTagCache > ;
30
+ NEXT_TAG_CACHE_DO_SHARDED ?: DurableObjectNamespace < DOShardedTagCache > ;
33
31
// Queue of failed tag write
34
- // It could be used for monitoring or to reprocess failed writes
35
- // Entirely optional
36
- NEXT_CACHE_DO_SHARDED_DLQ ?: Queue ;
32
+ // Optional, could be used to monitor or reprocess failed writes
33
+ NEXT_TAG_CACHE_DO_SHARDED_DLQ ?: Queue ;
34
+
35
+ // Durable Object namespace to use for the durable object queue
36
+ NEXT_CACHE_DO_QUEUE ?: DurableObjectNamespace < DurableObjectQueueHandler > ;
37
37
38
- // Below are the potential environment variables that can be set by the user to configure the durable object queue handler
38
+ // Below are the optional environment variables to configure the durable object queue
39
39
// The max number of revalidations that can be processed by the durable worker at the same time
40
- MAX_REVALIDATION_BY_DURABLE_OBJECT ?: string ;
40
+ NEXT_CACHE_DO_QUEUE_MAX_REVALIDATION ?: string ;
41
41
// The max time in milliseconds that a revalidation can take before being considered as failed
42
- REVALIDATION_TIMEOUT_MS ?: string ;
42
+ NEXT_CACHE_DO_QUEUE_REVALIDATION_TIMEOUT_MS ?: string ;
43
43
// The amount of time after which a revalidation will be attempted again if it failed
44
44
// If it fails again it will exponentially back off until it reaches the max retry interval
45
- REVALIDATION_RETRY_INTERVAL_MS ?: string ;
45
+ NEXT_CACHE_DO_QUEUE_RETRY_INTERVAL_MS ?: string ;
46
46
// The maximum number of attempts that can be made to revalidate a path
47
- MAX_REVALIDATION_ATTEMPTS ?: string ;
47
+ NEXT_CACHE_DO_QUEUE_MAX_NUM_REVALIDATIONS ?: string ;
48
48
// Disable SQLite for the durable object queue handler
49
49
// This can be safely used if you don't use an eventually consistent incremental cache (i.e. R2 without the regional cache for example)
50
- REVALIDATION_DO_DISABLE_SQLITE ?: string ;
50
+ NEXT_CACHE_DO_QUEUE_DISABLE_SQLITE ?: string ;
51
51
}
52
52
}
53
53
0 commit comments