View source: R/gutenberg_cache.R
| gutenberg_cache_set | R Documentation |
Configures whether the cache should be temporary (per-session) or persistent across sessions.
gutenberg_cache_set(
type = getOption("gutenbergr_cache_type", "session"),
verbose = TRUE
)
type |
Either
|
verbose |
Whether to show the status message confirming the path. |
The active cache path (invisibly).
The following options control caching behavior:
gutenbergr_cache_type: Character string indicating how downloaded works
are cached. Must be either "session" (default) or "persistent".
gutenbergr_base_cache_dir: Base directory used for persistent caching when
gutenbergr_cache_type = "persistent".
By default, this is an OS-specific cache directory determined by
tools::R_user_dir("gutenbergr", "cache"). Advanced users may set this
to a custom path.
# Set to persistent (survives R sessions)
gutenberg_cache_set("persistent")
# Set back to session cache (temporary)
gutenberg_cache_set("session")
# Check current cache location
gutenberg_cache_dir()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.