Learn R Programming

vegdata (version 0.9.12)

tdb_cache: Caching

Description

Manage cached vegdata files with hoardr

Arguments

Useful user functions

- `tdb_cache$cache_path_get()` get cache path - `tdb_cache$cache_path_set()` set cache path - `tdb_cache$list()` returns a character vector of full path file names - `tdb_cache$files()` returns file objects with metadata - `tdb_cache$details()` returns files with details - `tdb_cache$delete()` delete specific files - `tdb_cache$delete_all()` delete all files, returns nothing

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

Examples

Run this code
if (FALSE) {
tdb_cache

# list files in cache
tdb_cache$list()

# delete certain database files
# tdb_cache$delete("file path")
# tdb_cache$list()

# delete all files in cache
# tdb_cache$delete_all()
# tdb_cache$list()
}

Run the code above in your browser using DataLab