Saves data to file cache, which is unique for an optional key object.
# S3 method for default
saveCache(object, key=NULL, sources=NULL, suffix=".Rcache", comment=NULL, pathname=NULL,
dirs=NULL, compress=NULL, ...)
Returns (invisible) the pathname of the cache file.
The object to be saved to file.
An optional object from which a hexadecimal hash code will be generated and appended to the filename.
Source objects used for comparison of timestamps when cache is loaded later.
A character
string to be appended to the end of the
filename.
An optional character
string written in ASCII at the
beginning of the file.
(Advanced) An optional character
string specifying
the pathname to the cache file. If not specified (default), a unique
one is automatically generated from arguments key
and
suffix
among other things.
A character
vector
constituting the path to the
cache subdirectory (of the cache root directory
as returned by getCacheRootPath
()) to be used.
If NULL
, the path will be the cache root path.
If TRUE
, the cache file will be saved using
gzip compression, otherwise not.
Additional argument passed to save
().
The saveCache()
method saves a compressed cache file
(with filename extension *.gz) if argument compress
is TRUE
.
The loadCache
() method locates (via findCache
()) and
loads such cache files as well.
Henrik Bengtsson
For more details on how the hash code is generated etc, loadCache
().