-
Notifications
You must be signed in to change notification settings - Fork 58
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
cache_filesystem() shared folder across computers unexpectedly causes twice as many cache files #106
Comments
Removing |
Possibly related to #105 because my project is also organised as an R package. The analysis code in |
I've given up on this approach. Not sure why or how exactly, but something about the local enviroment is being hashed into the cache files' names, thus preventing the cache from being shared between my 2 computers. |
It is likely the source references for the functions, there are some fixes in the devel version of memoise but they might not be on CRAN. |
Thank you for the hint :-) I'll install from there when I need a shared cache again. Alternatively: How about a minor release? |
I'm querying a public API (metadata for DOIs) and share the cache folder between 2 computers. From a fixed set ca. 10k DOIs, my script uses
sample_frac(0.1)
in each run, so that the 2 computers (macOS & Win8) have a fair chance of downloading different DOIs and then obtaining the API response from the cache.However, I observe that with:
plus:
rmarkdown::render('README.Rmd')
,my shared chache grows towards twice the size (20k files in the
cache
folder) I expect (10k). Otherwise, everything seems fine: each subsequent rendering is faster than the one before, logging ofmemoise::hash_cache(download_from_DC )(DOI)
output shows that each DOI does get cached after its first download, etc.Do I need to set the
envir
parameter inmemoise()
in a way that is device-independent?Or could the different absolute paths fromrprojroot::find_root()
(Mac & Win) cause this?I'm about to
check this latter possibility, and/orrerun the check with 3 computers, but I'd also be happy about any advice about this :-) Thank you!The text was updated successfully, but these errors were encountered: