R/getCacheDir.R

Defines functions getCacheDir

Documented in getCacheDir

#' Get cache directory of a cachified function
#' @param f The function to return the cache directory from
#' @return The cache directory of the function
#' @export
getCacheDir <- function(f) {
  if (!('cachified' %in% names(attributes(f))))
    stop('Function is not cachified.')
  get('cacheDir', environment(f))
}
fnbn/cachifyR documentation built on May 5, 2019, 6:58 p.m.