saveTime method

  1. @override
void saveTime(
  1. String key,
  2. int duration
)
override

save expiry time in milliseconds for this data key - the key used to store the data duration - duration of cache in seconds

Implementation

@override
void saveTime(String key, int duration) {
  if (key.isEmpty) return;
  _expiryCache[key] = duration;
  // Rewrite the envelope so the expiry survives a restart.
  unawaited(_persistExpiry(key, duration));
}