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 to cache the data

refresh

bool option to force refresh of cache, default FALSE