rspack_core 0.100.0-rc.2

rspack core
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use super::Cache;
use crate::{Compilation, compilation::build_module_graph::BuildModuleGraphArtifact};

/// Disable cache implementation
///
/// Disable cache will clean the corresponding artifact before target step run.
#[derive(Debug)]
pub struct DisableCache;

#[async_trait::async_trait]
impl Cache for DisableCache {
  async fn before_build_module_graph(&mut self, compilation: &mut Compilation) {
    *compilation.build_module_graph_artifact = BuildModuleGraphArtifact::new();
  }
}