I am repeatedly calling a memoised function initialised as so:
library(memoise)
memoised_func <- memoise::memoise(func)
I am aware that I can set the size of the cache allocated to memoised_func
with the cache
argument (https://www.rdocumentation.org/packages/memoise/versions/2.0.0/topics/memoise). But is there a way to see how much free memory there is in the cache for at any one point in time?
I am asking because I want to know if it is filling up and therefore my programme could be sped up by increasing the size of the cache.
(I'm running R 4.0.2
on Ubuntu 20.10
in case that's relevant)