Skip to content

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

@wlandau-lilly

Description

@wlandau-lilly
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.

 

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions