touch method

Result<T> touch()

Attempts to convert the result to fresh Data (i.e. set the lastUpdate to DateTime.now()), preventing cache expiration.

If the current result is not Data, the existing result is kept and returned.

Implementation

Result<T> touch() => value = value.toFresh();