Use caching objects from cachem package#115
Conversation
|
I believe the covr tests are failing because covr manipulates the AST of the code, but this code expects things to be in a specific place: https://github.com/wch/memoise/blob/b1c628d5e9cd7fcac957bca918c516a2d7324573/R/memoise.R#L185-L195 The |
|
I don't think you should try to handle old style caches at all, people will just need to generate new caches. |
|
As for supporting old-style caches, I wanted to make sure that if people had made their own cache objects, it wouldn't break for them. How about this: I'll have |
|
I've updated the PR so hash = function(x) digest::digest(x, algo = "spookyhash"))Because the default is defined in the One possible way to avoid this issue: now that rlang 0.4.10 has a built-in hashing function, we could take a dependency on rlang instead of digest, and the default could be: hash = rlang::hash |
This PR updates memoise to use the caching objects from the cachem package. These caching objects support automatic pruning, so that they won't grow indefinitely.