R/memoise.R

Defines functions oc_clear_cache

Documented in oc_clear_cache

#' Clear the opencage cache
#'
#' Forget past results and reset the \pkg{opencage} cache.
#'
#' @examplesIf oc_key_present() && oc_api_ok()
#'
#' system.time(oc_reverse(latitude = 10, longitude = 10))
#' system.time(oc_reverse(latitude = 10, longitude = 10))
#' oc_clear_cache()
#' system.time(oc_reverse(latitude = 10, longitude = 10))
#'
#' @export
oc_clear_cache <- function() {
  memoise::forget(oc_get_memoise)
}
ropensci/opencage documentation built on Feb. 7, 2023, 8:48 p.m.