make_cacher: Make Cacher object

Description Usage Arguments Value See Also

View source: R/cache.R

Description

Make Cacher object

Usage

1
2
3
4
5
6
7
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()


arendsee/monadR documentation built on Dec. 16, 2020, 4:26 a.m.