diskCache: Create disk cache (deprecated)

View source: R/deprecated.R

diskCacheR Documentation

Create disk cache (deprecated)


Create disk cache (deprecated)


  dir = NULL,
  max_size = 500 * 1024^2,
  max_age = Inf,
  max_n = Inf,
  evict = c("lru", "fifo"),
  destroy_on_finalize = FALSE,
  missing = key_missing(),
  exec_missing = deprecated(),
  logfile = NULL



Directory to store files for the cache. If NULL (the default) it will create and use a temporary directory.


Maximum size of the cache, in bytes. If the cache exceeds this size, cached objects will be removed according to the value of the evict. Use Inf for no size limit. The default is 1 gigabyte.


Maximum age of files in cache before they are evicted, in seconds. Use Inf for no age limit.


Maximum number of objects in the cache. If the number of objects exceeds this value, then cached objects will be removed according to the value of evict. Use Inf for no limit of number of items.


The eviction policy to use to decide which objects are removed when a cache pruning occurs. Currently, "lru" and "fifo" are supported.


If TRUE, then when the cache_disk object is garbage collected, the cache directory and all objects inside of it will be deleted from disk. If FALSE (the default), it will do nothing when finalized.


A value to return when get(key) is called but the key is not present in the cache. The default is a key_missing() object. It is actually an expression that is evaluated each time there is a cache miss. See section Missing keys for more information.




An optional filename or connection object to where logging information will be written. To log to the console, use stderr() or stdout().

shiny documentation built on Aug. 12, 2023, 5:11 p.m.