Skip to contents

Returns TRUE if the object is present in the pkg's user-cache pins board and hasn't exceeded max_age, otherwise FALSE.

Usage

is_cached(board, id, max_age = "1 day")

Arguments

board

Package's user-cache pins board.

id

Pin name uniquely identifying the object to be checked in the pkg's user-cache pins board. A character scalar.

max_age

Maximum age the cached object is allowed to have. A valid lubridate duration. Defaults to 1 day (24 hours).

Value

A character scalar, or NULL if no cached object exists that hasn't exceeded max_age.

See also

Other object handling functions: cache_obj(), get_obj(), hash_fn_call(), rm_obj()