checkEntry method
Check the key
entry timeout. Returns true
if the key
expired.
- If the parameter
keyTimeout
is not provided the class fieldthis.keyTimeout
is used.
Implementation
bool checkEntry(Object? key, {DateTime? now, Duration? keyTimeout}) {
if (isEntryExpired(key, now: now, keyTimeout: keyTimeout)) {
_entries.remove(key);
_entriesPutTime.remove(key);
return true;
} else {
return false;
}
}