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.