only cache result if response status code is valid code