Ensure that connection to cache is disconnected consistently
Source:R/tw_caching.R
tw_disconnect_from_cache.RdEnsure that connection to cache is disconnected consistently
Usage
tw_disconnect_from_cache(
cache = NULL,
cache_connection = NULL,
disconnect_db = TRUE,
language = tidywikidatar::tw_get_language()
)Arguments
- cache
Defaults to NULL. If given, it should be given either
TRUEor FALSE. Typically set withtw_enable_cache()ortw_disable_cache().- cache_connection
Defaults to
NULL. IfNULL, and caching is enabled,tidywikidatarwill use a local sqlite database. A custom connection to other databases can be given (see vignettecachingfor details).- disconnect_db
Defaults to
TRUE. IfFALSE, leaves the connection to cache open.- language
Defaults to language set with
tw_set_language(); if not set, "en". Use "all_available" to keep all languages. For available language values, see the relevant Wikimedia page.
Examples
if (interactive()) {
tw_get(
id = c("Q180099"),
language = "en"
)
tw_disconnect_from_cache()
}