Skip to contents

Retrieves a cached object from a package's user-cache pins board if it is not older than max_age.

Usage

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

Arguments

board

Package's user-cache pins board.

id

Pin name uniquely identifying the object to be retrieved from 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

The cached object if it is not older than max_age, otherwise NULL.

See also

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