Learn R Programming

openadds (version 0.2.0)

oa_cache: Manage cached files

Description

Manage cached files

Usage

oa_cache_list()
oa_cache_delete(files, force = TRUE)
oa_cache_delete_all(force = TRUE)
oa_cache_details(files = NULL)

Arguments

files
File name or names
force
(logical) Should files be force deleted? Default: FALSE

Details

cache_delete only accepts 1 file name, while cache_delete_all doesn't accept any names, but deletes all files. For deleting many specific files, use cache_delete in a lapply type call

We cache using user_cache_dir, find your cache folder by executing rappdirs::user_cache_dir("openadds-cache")

Examples

Run this code
## Not run: 
# # list files in cache
# oa_cache_list()
# 
# # List info for single files
# oa_cache_details(files = oa_cache_list()[1])
# oa_cache_details(files = oa_cache_list()[2])
# 
# # List info for all files
# oa_cache_details()
# 
# # delete files by name in cache
# # oa_cache_delete(files = oa_cache_list()[1])
# 
# # delete all files in cache - BE CAREFUL, MAKE SURE YOU WANT TO DO THIS
# # oa_cache_delete_all()
# ## End(Not run)

Run the code above in your browser using DataLab