AutoSaveAsync
Purpose: Periodically saves data of type T asynchronously at regular intervals.
Parameters:
key: A string to define the file path.
data: The data to save periodically, constrained to reference types.
intervalSeconds: The time interval (in seconds) between each save operation.
cancellationToken: A token to cancel the auto-save loop.
Return Value: An async Task.
Last updated