cache_size() measures the disk space of the model cache: it sums the sizes
of all regular files beneath a cache root, including downloaded models and
the files of custom models. A pinned model takes from about 31 MB to 1.3 GB
of disk (the size_mb column of models()), and the cache keeps every model
and custom model downloaded until it is removed, so this total is the basis
for deciding what to remove.
It returns the total size in bytes. To list the files of one model, use
model_status(); to delete one, use model_remove().
Arguments
- cache_dir
Cache root (default the package cache directory,
cache_dir()).
See also
cache_dir() for the location; model_status() for one model's
files; model_remove() to free space.
