cache api requests