Skip to content

Commit c192f4e

Browse files
authored
turbopack: rename custom cache handler configs (#60828)
Follow up for #57953 for turbopack side Closes NEXT-2153
1 parent 2227ae5 commit c192f4e

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

packages/next-swc/crates/next-core/src/next_config.rs

+8-6
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ pub struct NextConfig {
7878
pub config_file: Option<String>,
7979
pub config_file_name: String,
8080

81+
/// In-memory cache size in bytes.
82+
///
83+
/// If `cache_max_memory_size: 0` disables in-memory caching.
84+
pub cache_max_memory_size: Option<f64>,
85+
/// custom path to a cache handler to use
86+
pub cache_handler: Option<String>,
87+
8188
pub env: IndexMap<String, JsonValue>,
8289
pub experimental: ExperimentalConfig,
8390
pub images: ImageConfig,
@@ -427,10 +434,6 @@ pub struct ExperimentalConfig {
427434
pub client_router_filter_allowed_rate: Option<f64>,
428435
pub client_router_filter_redirects: Option<bool>,
429436
pub fetch_cache_key_prefix: Option<String>,
430-
/// In-memory cache size in bytes.
431-
///
432-
/// If `isr_memory_cache_size: 0` disables in-memory caching.
433-
pub isr_memory_cache_size: Option<f64>,
434437
pub isr_flush_to_disk: Option<bool>,
435438
/// For use with `@next/mdx`. Compile MDX files using the new Rust compiler.
436439
/// @see https://nextjs.org/docs/app/api-reference/next-config-js/mdxRs
@@ -481,8 +484,7 @@ pub struct ExperimentalConfig {
481484
force_swc_transforms: Option<bool>,
482485
fully_specified: Option<bool>,
483486
gzip_size: Option<bool>,
484-
/// custom path to a cache handler to use
485-
incremental_cache_handler_path: Option<String>,
487+
486488
instrumentation_hook: Option<bool>,
487489
large_page_data_bytes: Option<f64>,
488490
logging: Option<serde_json::Value>,

packages/next-swc/crates/next-core/src/util.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ pub async fn render_data(
734734
server_info: server_info.ok(),
735735
allowed_revalidate_header_keys: experimental.allowed_revalidate_header_keys.clone(),
736736
fetch_cache_key_prefix: experimental.fetch_cache_key_prefix.clone(),
737-
isr_memory_cache_size: experimental.isr_memory_cache_size,
737+
isr_memory_cache_size: config.cache_max_memory_size,
738738
isr_flush_to_disk: experimental.isr_flush_to_disk,
739739
})?;
740740
Ok(Vc::cell(value))

0 commit comments

Comments
 (0)