renewal method

void renewal(
  1. double? duration, {
  2. double? now,
})

renewal cache with a temporary life span and current time in seconds

Implementation

void renewal(double? duration, {double? now}) {
  duration ??= 120;
  now ??= Time.currentTimestamp;
  _expired = now + duration;
  _deprecated = now + _life * 2;
}