-
-
Notifications
You must be signed in to change notification settings - Fork 878
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
Changes to the cache API required by the new reticulate
cache implementation
#2170
base: master
Are you sure you want to change the base?
Conversation
|
…ays be invalidated
Updated: The last commit should work with rstudio/reticulate@a33ed39 and uqfoundation/dill@4244d3b |
…a dir if it exists)
… of full `options`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good over all. I'll make a few cosmetic changes and merge later. Thank you!
R/cache.R
Outdated
cache_purge = function(hash) { | ||
for (h in hash) unlink(paste(cache_path(h), c('rdb', 'rdx', 'RData'), sep = '.')) | ||
cache_purge = function(glob_path) { | ||
unlink(paste(glob_path, c('rdb', 'rdx', 'RData'), sep = '.')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that glob_path
could be a vector of length > 1, so we still need to purge them one by one via a loop.
Conflicts: NEWS.md [ci skip]
Oh actually since the API has changed, we need to update the documentation accordingly: Lines 35 to 51 in 6bfffe9
Could you please also do that? Thank you! |
As we discussed in rstudio/reticulate#1210 (comment), these changes use the same interface for the cache of external engines as the R cache interface. Relevant changes for non-R chunks:
cache_engines
stores cache importer functions that, upon call, return "cache objects", i.e. lists with functions as items (exists
,load
,save
,purge
, etc.)knit()
call's working directoryexists()
) and purges are done for R cache and external cache together for consistencyPlus a bug fix: always check for
.RData
files (which stores the output in lazy cache mode if I understood it right).@yihui You may review this PR right away, but let's hold the merge while I'm still implementing and testing the
reticulate
PR.