| wa_cache_clear | R Documentation |
Deletes all files under wa_cache_dir(). If ask = TRUE and in an
interactive session, a short preview (item count, total size, and up to 10 sample
paths) is printed before asking for confirmation. In a non-interactive script,
no prompt is shown, even if ask = TRUE. Use this only on a dedicated
cache folder; all its contents are removed.
wa_cache_clear(ask = interactive(), preview = TRUE)
ask |
Logical; if |
preview |
Logical; if |
Invisibly returns TRUE if the cache was cleared (or already absent),
FALSE if the user declined or deletion failed.
wa_cache_dir
local({
old <- options(writeAlizer.cache_dir = tempfile("wa-cache-"))
on.exit(options(old))
dir.create(wa_cache_dir())
on.exit(unlink(wa_cache_dir(), recursive = TRUE), add = TRUE, after = FALSE)
writeLines("demo", file.path(wa_cache_dir(), "demo.txt"))
wa_cache_clear(ask = FALSE)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.