isAlive method

bool isAlive({
  1. double? now,
})

check whether cache is alive with current time in seconds

Implementation

bool isAlive({double? now}) {
  now ??= Time.currentTimestamp;
  return now < _expired;
}