cache_kb_self.Rd
Convenience function to cache to your own public or private Keybase folder
cache_kb_self(cache_subdir, private = TRUE, algo = "sha512")
cache_subdir, private | subdirectory under either |
---|---|
algo | The hashing algorithm used for the cache, see |
This ultimately uses cache_fs2()
, which means two additional functions are
provided in slots in the returned list:
location()
which will return the path to the cache directory
size()
which will compute and return the size of the cache (in bytes)
if (tinytest::at_home()) { kbc <- cache_kb_self(".cache") kbc$location() mrunif <- memoise::memoise(runif, cache = kbc) mrunif(10) # First run, saves cache mrunif(10) # Loads cache, results should be identical kbc$keys() kbc$size() kbc$reset() kbc$size() }