putIfAbsentChecked method

V putIfAbsentChecked(
  1. K key,
  2. V ifAbsent(), {
  3. DateTime? now,
  4. Duration? keyTimeout,
})

Same as putIfAbsent, but calls checkEntry first.

Implementation

V putIfAbsentChecked(
  K key,
  V Function() ifAbsent, {
  DateTime? now,
  Duration? keyTimeout,
}) {
  checkEntry(key, now: now, keyTimeout: keyTimeout);
  return putIfAbsent(key, ifAbsent);
}