-
Notifications
You must be signed in to change notification settings - Fork 58
Closed
Description
I think this is a new issue with version 2.0.0. The function generated by has_cache attempts to read the actual cache result into memory before returning that the call is indeed cached. This is problematic for large cached dataframes, etc.
> has_cache(getter)
function (date, arg1)
{
mc <- match.call()
encl <- parent.env(environment())
called_args <- as.list(mc)[-1]
default_args <- encl$`_default_args`
default_args <- default_args[setdiff(names(default_args),
names(called_args))]
called_args[encl$`_omit_args`] <- NULL
args <- c(lapply(called_args, eval, parent.frame()), lapply(default_args,
eval, envir = environment()))
key <- encl$`_hash`(c(encl$`_f_hash`, args, lapply(encl$`_additional`,
function(x) eval(x[[2L]], environment(x)))))
res <- encl$`_cache`$get(key) # <---- This should probably be removed?
return(encl$`_cache`$exists(key))
if (res$visible) {
res$value
}
else {
invisible(res$value)
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels