Add get_cache_size function
Fix up variable namming collision