Skip to content

ISwr.MutateAsync method

Executes a mutation action and invalidates the specified cache keys. If the mutation throws, no cache keys are evicted.

public Task MutateAsync(Func<Task> mutation, params string[] invalidateKeys)
parameterdescription
mutationThe async action to execute (e.g., a POST/PUT/DELETE call).
invalidateKeysCache keys to evict after the mutation completes successfully.