omnipath_cache_latest_or_new | R Documentation |
Looks up a record in the cache and returns its latest valid version. If the record doesn't exist or no valid version available, creates a new one.
omnipath_cache_latest_or_new(
key = NULL,
url = NULL,
post = NULL,
payload = NULL,
create = TRUE,
...
)
key |
The key of the cache record |
url |
URL pointing to the resource |
post |
HTTP POST parameters as a list |
payload |
HTTP data payload |
create |
Logical: whether to create and return a new version. If FALSE only the latest existing valid version is returned, if available. |
... |
Passed to |
A cache version item.
## Not run:
# retrieve the latest version of the first cache record
# found by the search keyword "bioplex"
latest_bioplex <-
omnipath_cache_latest_or_new(
names(omnipath_cache_search('bioplex'))[1]
)
latest_bioplex$dl_finished
# [1] "2021-03-09 14:28:50 CET"
latest_bioplex$path
# [1] "/home/denes/.cache/OmnipathR/378e0def2ac97985f629-1.rds"
## End(Not run)
# create an example cache record
bioc_url <- 'https://bioconductor.org/'
version <- omnipath_cache_latest_or_new(url = bioc_url)
omnipath_cache_remove(url = bioc_url) # cleaning up
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.