Simple key-value cache function accepting closures

simpleCache(object, key, path = getOption("custom_data_path"), refresh = FALSE)

Arguments

object

closure with return expression to be cached

key

cache key

path

path where to cache the data

refresh

bool option to force refresh of cache, default FALSE

Value

object, (potentially cached version)