updateValue method

void updateValue(
  1. V? newValue, {
  2. double? now,
})

update cache value with current time in seconds

Implementation

void updateValue(V? newValue, {double? now}) {
  _value = newValue;
  now ??= Time.currentTimestamp;
  _expired = now + _life;
  _deprecated = now + _life * 2;
}