spark.worker.clearAllPersisted
function clearAllPersisted(): voidClear all persisted state.
Removes all persisted values, effectively resetting the worker state. Useful for cleanup or testing.
Examples
// Full reset before training new model
spark.clearAllPersisted();
// All subsequent persist() calls will reinitialize
const model = spark.persist('model', () => createNewModel());See Also
- clearPersisted - Clear single value
- getPersistedKeys - See what's persisted