Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

turbopack: rename custom cache handler configs #60828

Merged
merged 3 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 8 additions & 6 deletions packages/next-swc/crates/next-core/src/next_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ pub struct NextConfig {
pub config_file: Option<String>,
pub config_file_name: String,

/// In-memory cache size in bytes.
///
/// If `cache_max_memory_size: 0` disables in-memory caching.
pub cache_max_memory_size: Option<f64>,
/// custom path to a cache handler to use
pub cache_handler: Option<String>,

pub env: IndexMap<String, JsonValue>,
pub experimental: ExperimentalConfig,
pub images: ImageConfig,
Expand Down Expand Up @@ -427,10 +434,6 @@ pub struct ExperimentalConfig {
pub client_router_filter_allowed_rate: Option<f64>,
pub client_router_filter_redirects: Option<bool>,
pub fetch_cache_key_prefix: Option<String>,
/// In-memory cache size in bytes.
///
/// If `isr_memory_cache_size: 0` disables in-memory caching.
pub isr_memory_cache_size: Option<f64>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we leave a warning when the experimental configs are used still?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will add later in a different one

pub isr_flush_to_disk: Option<bool>,
/// For use with `@next/mdx`. Compile MDX files using the new Rust compiler.
/// @see https://nextjs.org/docs/app/api-reference/next-config-js/mdxRs
Expand Down Expand Up @@ -481,8 +484,7 @@ pub struct ExperimentalConfig {
force_swc_transforms: Option<bool>,
fully_specified: Option<bool>,
gzip_size: Option<bool>,
/// custom path to a cache handler to use
incremental_cache_handler_path: Option<String>,

instrumentation_hook: Option<bool>,
large_page_data_bytes: Option<f64>,
logging: Option<serde_json::Value>,
Expand Down
2 changes: 1 addition & 1 deletion packages/next-swc/crates/next-core/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ pub async fn render_data(
server_info: server_info.ok(),
allowed_revalidate_header_keys: experimental.allowed_revalidate_header_keys.clone(),
fetch_cache_key_prefix: experimental.fetch_cache_key_prefix.clone(),
isr_memory_cache_size: experimental.isr_memory_cache_size,
isr_memory_cache_size: config.cache_max_memory_size,
isr_flush_to_disk: experimental.isr_flush_to_disk,
})?;
Ok(Vc::cell(value))
Expand Down