Skip to contents

Returns information about the local cache: where it lives, how many files it contains, and how much disk space they take. Useful when debugging stale results or deciding whether to call clear_cache().

Usage

fred_cache_info()

Value

A list with elements dir, n_files, size_bytes, size_human, and files (a data frame with name, size_bytes, and modified columns). Returns the same shape with zero counts if the cache directory does not yet exist.

See also

Examples

# \donttest{
op <- options(fred.cache_dir = tempdir())
fred_cache_info()
#> $dir
#> [1] "/tmp/Rtmp978TuU"
#> 
#> $n_files
#> [1] 1
#> 
#> $size_bytes
#> [1] 4096
#> 
#> $size_human
#> [1] "4.0 MB"
#> 
#> $files
#>      name size_bytes            modified
#> 1 downlit       4096 2026-05-04 19:14:19
#> 
options(op)
# }