Added optional tracking of cache usage