Cache dock icon badge counts to avoid redraws.