How to clean up unused cache variables?

I don’t think there’s a “supposed to” for this. Generally they just accumulate and if they start to get noisy, a refreshing the build tree is always an option.