Skip to contents

Reports how much disk space the files under a cache root take, for example the downloaded models, so the cache can be pruned with model_remove().

Usage

cache_size(cache_dir = cache_dir())

Arguments

cache_dir

Cache root returned by cache_dir().

Value

A single number: the total bytes used by regular files beneath the cache root, or 0 when it does not exist.

Examples

cache_size(tempdir())
#> [1] 3503285