Description Usage Arguments Value Note Examples
Read the cached result of an expression from a locally cached file if it exists, else evaluate the expression, cache it, and return result.
1 | read_or_update_local_cache(expression, local_cache_path, object_name)
|
expression |
The expression to be evaluated and returned if the cached result does not exist. |
local_cache_path |
The path that stores the cached objects. If NULL, no caching is performed. |
object_name |
The name of the object used to read/create the cache file. |
The result of evaluating the expression, either read from cache or from actually evaluating it.
If evaluating the expression has side-effects, they will not happen if the result is returned from cache.
1 2 3 4 | ## Not run:
read_or_update_local_cache(2+2, tempdir(), "TwoPlusTwo")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.