Currently when lockfile is changed, all cache will be invalidated. For some dependencies like components, they could be changed frequently, so Farm need to support configuring that if some packages are changed, only caches of these packages are invalidated, caches of other packages should be reused.
What does the proposed API look like?
add a loose: boolean, when keys like lockfile changed with loose: true, all cache should not be invalidated, and Farm should validate cache for immutable modules.
optimize optimize_module_graph and render_resource_pot_modules cache. optimize_module_graph should be cached to skip unnecessary calculations. and cache of render_resource_pot_modules should considering used exports info of the modules.
Config can be modified in rust plugins, farm should use final config to generate cache key for global keys.
Optimize cache storage algorithm, there are thousands of modules generated under node_modules/.farm/cache, we needs to limit the storage usege
What problem does this feature solve?
Currently when lockfile is changed, all cache will be invalidated. For some dependencies like components, they could be changed frequently, so Farm need to support configuring that if some packages are changed, only caches of these packages are invalidated, caches of other packages should be reused.
What does the proposed API look like?
loose: boolean
, when keys like lockfile changed withloose: true
, all cache should not be invalidated, and Farm should validate cache for immutable modules.node_modules/.farm/cache
, we needs to limit the storage usege