cache api calls