View source: R/cache_readwrite.R
sync_cache | R Documentation |
Syncs cached files across storage depths by incrementally updating using cache_update or simply copying and converting the most recently-modified cache to the other locations using cache_read and cache_write.
sync_cache(
table_name,
type,
incremental = FALSE,
date_column = NULL,
whole_file = !cache_exists_any(table_name, type),
...
)
table_name |
string |
type |
string, e.g. "tessi" or "stream" |
incremental |
boolean, whether to incrementally update the caches by using cache_update or simply copying the whole file. |
date_column |
character name of the column to be used for determining the date of last row update, useful for incremental updates. |
whole_file |
boolean, whether to copy the whole file using file.copy or to convert it using cache_read and cache_write. The default is to convert if the cache is in a recognizable arrow format and to copy if it is not. |
... |
additional parameters passed on to cache_update |
invisible
## Not run:
x <- data.table(a = c(1, 2, 3))
write_cache(x, "test", "stream", primary_keys = c("a"))
sync_cache("test", "stream")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.