Skip to main content

apply_cached_operations

Function apply_cached_operations 

Source
pub async fn apply_cached_operations(
    cache: &CacheData,
    config: &MatchConfig,
) -> Result<()>
Expand description

Replay a frozen set of cached match operations.

This helper powers the cache apply command. It reconstructs MatchOperation values from the paths recorded in cache, without performing any additional AI analysis or validation, and then feeds them through the standard MatchEngine::execute_operations pipeline so the same journal and file-system guarantees apply.

The provided config determines runtime behaviour such as relocation mode, backup handling and conflict resolution. Callers are expected to synchronise the config with the original cache’s recorded values when strict replay fidelity is required.

§Errors

Returns an error if any cached source path cannot be read or if the underlying execution pipeline fails.