Add API for accessing cache stats.