Description Usage Arguments Details Value Examples
View source: R/cache_register.R
Register a backend for reading and writing to the cache.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
name |
string; name for the backend. |
reader |
function for reading from the cache, defaults to
function |
writer |
function; function for writing to the cache, |
ext |
string; the extension used for the file type, usually everything
after the final period. Defaults to |
... |
additional name/value pairs to be stored in the backend. |
cache_register()
defines a backend for storing and retrieving data using
cache. Ultimately, it associated an filename extension with functions for
reading and writing cache files with that extension.
Unless you are writing a new backend, you will not need to use this function.
cache_backend_register
is an alias for cache_register
.
The value from base::options()
is returned
1 2 3 4 | ## Not run:
cache_register( 'csv', readr::read_csv, readr::write_csv )
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.