| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/deprecated.R |
| 3 |
\name{diskCache} |
| 4 |
\alias{diskCache} |
| 5 |
\title{Create disk cache (deprecated)} |
| 6 |
\usage{ |
| 7 |
diskCache( |
| 8 |
dir = NULL, |
| 9 |
max_size = 500 * 1024^2, |
| 10 |
max_age = Inf, |
| 11 |
max_n = Inf, |
| 12 |
evict = c("lru", "fifo"), |
| 13 |
destroy_on_finalize = FALSE, |
| 14 |
missing = key_missing(), |
| 15 |
exec_missing = deprecated(), |
| 16 |
logfile = NULL |
| 17 |
) |
| 18 |
} |
| 19 |
\arguments{ |
| 20 |
\item{dir}{Directory to store files for the cache. If \code{NULL} (the default) it |
| 21 |
will create and use a temporary directory.} |
| 22 |
|
| 23 |
\item{max_size}{Maximum size of the cache, in bytes. If the cache exceeds |
| 24 |
this size, cached objects will be removed according to the value of the |
| 25 |
\code{evict}. Use \code{Inf} for no size limit. The default is 1 gigabyte.} |
| 26 |
|
| 27 |
\item{max_age}{Maximum age of files in cache before they are evicted, in |
| 28 |
seconds. Use \code{Inf} for no age limit.} |
| 29 |
|
| 30 |
\item{max_n}{Maximum number of objects in the cache. If the number of objects |
| 31 |
exceeds this value, then cached objects will be removed according to the |
| 32 |
value of \code{evict}. Use \code{Inf} for no limit of number of items.} |
| 33 |
|
| 34 |
\item{evict}{The eviction policy to use to decide which objects are removed |
| 35 |
when a cache pruning occurs. Currently, \code{"lru"} and \code{"fifo"} are supported.} |
| 36 |
|
| 37 |
\item{destroy_on_finalize}{If \code{TRUE}, then when the cache_disk object is |
| 38 |
garbage collected, the cache directory and all objects inside of it will be |
| 39 |
deleted from disk. If \code{FALSE} (the default), it will do nothing when |
| 40 |
finalized.} |
| 41 |
|
| 42 |
\item{missing}{A value to return when \code{get(key)} is called but the key is not |
| 43 |
present in the cache. The default is a \code{\link[cachem:key_missing]{key_missing()}} object. It is |
| 44 |
actually an expression that is evaluated each time there is a cache miss. |
| 45 |
See section Missing keys for more information.} |
| 46 |
|
| 47 |
\item{exec_missing}{Deprecated.} |
| 48 |
|
| 49 |
\item{logfile}{An optional filename or connection object to where logging |
| 50 |
information will be written. To log to the console, use \code{stderr()} or |
| 51 |
\code{stdout()}.} |
| 52 |
} |
| 53 |
\description{ |
| 54 |
Create disk cache (deprecated) |
| 55 |
} |
| 56 |
\keyword{internal} |