Added calculation of cache size.