Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add "turn cache off" function #95

Closed
mpadge opened this issue Jun 5, 2019 · 1 comment
Closed

add "turn cache off" function #95

mpadge opened this issue Jun 5, 2019 · 1 comment

Comments

@mpadge
Copy link
Member

mpadge commented Jun 5, 2019

dodgr_cache_off <- function () {
    Sys.setenv ("DODGR_CACHE" = "FALSE")
}
is_dodgr_cache_on <- function () {
    as.logical (Sys.getenv ("DODGR_CACHE", unset = "TRUE"))
}
is_dodgr_cache_on ()
#> [1] TRUE
dodgr_cache_off ()
is_dodgr_cache_on ()
#> [1] FALSE

Created on 2019-06-05 by the reprex package (v0.3.0)

This is necessary for other packages which need to just call one or two functions and return results as quickly as possible. With full caching, any additional function calls wait until the whole background process has finished before proceeding, so there really needs to be a way to stop that.

@mpadge
Copy link
Member Author

mpadge commented Jun 5, 2019

see njtierney/maxcovr/issues/77 for why this function is necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant