Skip to main content

compact_database

Function compact_database 

Source
pub fn compact_database(
    base_path: &Path,
    version_info: &GitVersionInfo<'_>,
    is_ci: bool,
) -> Result<()>
Expand description

Opens a Turbopack persistent cache database at the given base path and performs a full compaction. This is intended for use by the next internal post-build CLI command to optimize the database after a build, without requiring the full turbo-tasks runtime.

The parallel scheduler requires a Tokio runtime. If one is already active (e.g. when called from a NAPI async function), it is reused. Otherwise a new multi-threaded runtime is created.