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

(Re)initialize file system cache if it does not exist. #51

Closed
wlandau-lilly opened this issue Aug 3, 2017 · 3 comments
Closed

(Re)initialize file system cache if it does not exist. #51

wlandau-lilly opened this issue Aug 3, 2017 · 3 comments
Labels
bug an unexpected problem or unintended behavior

Comments

@wlandau-lilly
Copy link

library(memoise)
f = memoise(rnorm, cache = cache_filesystem("cache"))
dir.create("new_dir")
setwd("new_dir")
f(1) 
## Error in gzfile(file, mode) : cannot open the connection 
## In addition: Warning message: 
## In gzfile(file, mode) :
##    cannot open compressed file 'cache/75bed0259340d03b', 
##    probable reason 'No such file or directory'

Users may also want to write packages with already-memoised functions, and the users of those packages could call the functions from any working directory.

 

@jimhester
Copy link
Member

Would be best if we just use absolute rather than relative paths when we create the cache initially.

@wlandau-lilly
Copy link
Author

Seems like that would cover the majority of use cases.

@jimhester jimhester added the bug an unexpected problem or unintended behavior label May 4, 2018
@hadley
Copy link
Member

hadley commented Sep 2, 2020

Was fixed in 3a06c2c

@hadley hadley closed this as completed Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants