drop_cache | R Documentation |
Drops the cache of a memoised function for particular arguments.
drop_cache(f)
f |
Memoised function. |
A function, with the same arguments as f
, that can be called to drop
the cached results of f
.
has_cache
, memoise
mem_sum <- memoise(sum)
mem_sum(1, 2, 3)
mem_sum(2, 3, 4)
has_cache(mem_sum)(1, 2, 3) # TRUE
has_cache(mem_sum)(2, 3, 4) # TRUE
drop_cache(mem_sum)(1, 2, 3) # TRUE
has_cache(mem_sum)(1, 2, 3) # FALSE
has_cache(mem_sum)(2, 3, 4) # TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.