revalidatePurgedEntries method
Restore purged entries that are currently valid. Only relevant if keepPurgedEntries is true.
Implementation
int revalidatePurgedEntries() {
var purged = _purged;
if (purged == null) return 0;
var revalidateCount = 0;
purged.removeWhere((k, v) {
var value = v.value;
if (isValidEntry(k, value)) {
++revalidateCount;
_map[k] = value;
return true;
} else {
return false;
}
});
if (revalidateCount > 0) {
_expireCache();
}
_revalidatedPurgedEntriesCount += revalidateCount;
return revalidateCount;
}