X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/763d5e6ad88ef3ba1cd1d7742d060e4f1e54c6b8..58a4416cce6611c4baf4f55f6e3e65b3daed6366:/lib/cache.c?ds=sidebyside diff --git a/lib/cache.c b/lib/cache.c index 1379f66..c6624e8 100644 --- a/lib/cache.c +++ b/lib/cache.c @@ -97,6 +97,10 @@ void cache_clean(const struct cache_type *type) { hash_foreach(h, clean_callback, (void *)type); } +size_t cache_count(void) { + return h ? hash_count(h) : 0; +} + /* Local Variables: c-basic-offset:2