Skip to content

Commit

Permalink
Merge pull request #13 from ropensci/dev
Browse files Browse the repository at this point in the history
add function to clear cache (#6)
  • Loading branch information
tylerlittlefield committed May 11, 2021
2 parents ab33bb7 + 0a7ef5e commit b8860eb
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 1 deletion.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Generated by roxygen2: do not edit by hand

export(exoplanets)
export(forget_exoplanets)
16 changes: 16 additions & 0 deletions R/cache.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#' Clear the exoplanets cache
#'
#' Forget past results and reset the \code{exoplanets} cache.
#'
#' @examples
#' if (interactive()) {
#' system.time(exoplanets("k2names"))
#' system.time(exoplanets("k2names"))
#' forget_exoplanets()
#' system.time(exoplanets("k2names"))
#' }
#'
#' @export
forget_exoplanets <- function() {
memoise::forget(exoplanets)
}
1 change: 1 addition & 0 deletions R/exoplanets-package.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#' @aliases exoplanets-package
#' @keywords internal
"_PACKAGE"

Expand Down
2 changes: 1 addition & 1 deletion man/exoplanets-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions man/forget_exoplanets.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b8860eb

Please sign in to comment.