Skip to main content

due

Function due 

Source
pub fn due(cache: Option<&Cache>, now: SystemTime) -> bool
Expand description

Whether the cache asks for a network read at now.

After an attempt that failed, or that never finished, a read is due only one hour after that attempt, whatever an older success says. An attempt never finished where it is later than the last success, or where no success exists, and no error was recorded. Otherwise a read is due where the cache is missing, holds no success, or holds a success seven days old or more. Times compare as times, and an unreadable time counts as missing.