Add API cache mechanism