Code cleanup for global stats cache