dot-tooOld: Determine if a cache file is sufficiently old to warrant...

Description Usage Arguments Value

Description

.tooOld accepts a maximum cache age and checks for an option with that setting under MAX.CACHE.AGE if such an argument isn't passed. If the indicated file exists and is older than the threshold passed or set as an option, the file is deemed "stale." If an age threshold is provided, no check for an option is performed. If the file does not exist or there's not an age threshold directly passed or set as an option, the result is FALSE.

Usage

1
.tooOld(pathCacheFile, lifespan = NULL)

Arguments

pathCacheFile

Path to file to ask about staleness.

lifespan

Maximum file age before it's "stale."

Value

TRUE if the file exists and its age exceeds lifespan if given or getOption("MAX.CACHE.AGE") if no age threshold is passed and that option exists; FALSE otherwise.


simpleCache documentation built on April 17, 2021, 9:08 a.m.