Learn R Programming

rmonad (version 0.7.0)

make_cacher: Make Cacher object

Description

Make Cacher object

Usage

make_cacher(f_path = function() getOption("rmonad.cache_dir"),
  f_save = saveRDS, f_get = readRDS, f_del = unlink,
  f_ext = function(cls) ".Rdata")

Arguments

f_path

A function for finding the directory in which to cache results

f_save

function of x and filename that saves x to the path filename

f_get

function of filename that retrieves the cached data

f_del

function of filename that deletes the cached data

f_ext

function of class(x) that determines the filename extension

Value

A function that builds a local cache function for a value

See Also

Other cache: clear_cache, fail_cache, make_recacher, memory_cache, no_cache, void_cache