% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cache.R
\title{Sets the download status to ready for a cache item}
omnipath_cache_download_ready(version, key = NULL)
\item{version}{Version of the cache item. If does not exist a new version
item will be created}

\item{key}{Key of the cache item}
Character: invisibly returns the version number of the cache
    version item.
Sets the download status to ready for a cache item
bioc_url <- 'https://bioconductor.org/'
# request a new version item (or retrieve the latest)
new_version <- omnipath_cache_latest_or_new(url = bioc_url)
# check if the version item is not a finished download
# [1] "unknown"
# download the file
httr::GET(bioc_url, httr::write_disk(new_version$path, overwrite = TRUE))
# report to the cache database that the download is ready
# now the status is ready:
version <- omnipath_cache_latest_or_new(url = bioc_url)
# "ready"
# [1] "2021-03-09 16:48:38 CET"
omnipath_cache_remove(url = bioc_url) # cleaning up