Add optional cache to MySQL balance manager