selectEntry method Null safety

  1. @override
bool selectEntry(
  1. CacheInfo entry,
  2. CacheInfo selectedEntry,
  3. DateTime now

Returns true if entry is a better candidate for eviction than the current selectedEntry

  • entry: The current entry
  • selectedEntry: The current selected entry
  • now: The current time


bool selectEntry(CacheInfo entry, CacheInfo selectedEntry, DateTime now) {
  return entry.hitCount > selectedEntry.hitCount;