R/checkCache.R

Defines functions checkCache

Documented in checkCache

#' Check cache
#' 
#' Quick function to check if object is already saved.
#' @param cache BiocFileCache.
#' @param url Path to cached file.  
#' @keywords internal
#' @returns path 
checkCache <- function(cache=BiocFileCache::BiocFileCache(ask = FALSE),
                       url) {
  
    check_dep("BiocFileCache")
    cached <- BiocFileCache::bfcinfo(cache)$rname
    return(url %in% cached)
}
serachoi1230/EpiCompare documentation built on Jan. 30, 2024, 11:37 a.m.