diff --git a/DESCRIPTION b/DESCRIPTION index b8357633..b564dfcd 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -28,7 +28,7 @@ URL: https://doi-usgs.github.io/nhdplusTools/ https://github.com/doi-usgs/nhdplu BugReports: https://github.com/doi-usgs/nhdplusTools/issues/ Depends: R (>= 4.0) -Imports: hydroloom, dataRetrieval, dplyr, sf, units, magrittr, jsonlite, httr, xml2, R.utils, utils, tidyr, methods, maptiles, mapsf, fst, arrow, tools, zip, pbapply, memoise +Imports: hydroloom, dataRetrieval, dplyr, sf, units, magrittr, jsonlite, httr, xml2, R.utils, utils, tidyr, methods, maptiles, mapsf, fst, arrow, tools, zip, pbapply, memoise, digest Suggests: testthat, knitr, rmarkdown, ggmap, ggplot2, lwgeom, gifski, leaflet, httptest, future, future.apply License: CC0 Encoding: UTF-8 diff --git a/NAMESPACE b/NAMESPACE index 94217dc9..554b8292 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -77,6 +77,7 @@ export(subset_rpu) export(subset_vpu) importFrom(arrow,open_dataset) importFrom(arrow,s3_bucket) +importFrom(digest,digest) importFrom(dplyr,across) importFrom(dplyr,all_of) importFrom(dplyr,any_of) @@ -131,6 +132,9 @@ importFrom(hydroloom,sort_network) importFrom(hydroloom,st_compatibalize) importFrom(jsonlite,fromJSON) importFrom(magrittr,`%>%`) +importFrom(memoise,cache_filesystem) +importFrom(memoise,cache_memory) +importFrom(memoise,memoise) importFrom(methods,as) importFrom(methods,is) importFrom(pbapply,pbapply) diff --git a/R/A_nhdplusTools.R b/R/A_nhdplusTools.R index b038624c..a4fa1cc2 100644 --- a/R/A_nhdplusTools.R +++ b/R/A_nhdplusTools.R @@ -382,6 +382,8 @@ nhdplusTools_cache_settings <- function(mode = NULL, timeout = NULL) { return(invisible(list(mode = current_mode, timeout = current_timeout))) } +#' @importFrom memoise memoise cache_memory cache_filesystem +#' @importFrom digest digest nhdplusTools_memoise_cache <- function() { sys_memo_cache <- Sys.getenv("NHDPLUSTOOLS_MEMOISE_CACHE") ses_memo_cache <- try(get("nhdpt_mem_cache", envir = nhdplusTools_env), silent = TRUE)