# disk_cache_usage

> Estimate the amount of cache space used

### Prototype

        disk_cache_usage()

### Description

> This function estimates the amount of cache space occupied by objects of persistent classes. It returns a table with two columns: the name of the class and the total size of cached objects of this class.

> Note that this function does not report the precise amount of cache used by a class. This function assumes that each object is completely fetched in memory. Also, for small fixed size objects, this function sums up all allocated objects present on all pages in the cache, but it does not take into account free space on the pages managed by the fixed record allocator.

### Example

        XSQL>select * from disk_cache_usage() order by size desc;
        name	size
        ------------------------------------------------------------------------------
        boo	4800000
        foo	2400000
        Selected records: 2