cache api responses