saveTime method
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));
}