How can I cache WordPress Rest API Response

You should create a new instance from WP_REST_Response to set the Cache-Control value.

<?php
register_rest_route('wp/v2', '/your_endpoint', array(
    'methods' => 'GET',
    'callback' => 'function_callback',
));

function function_callback($data) {
  $response = array(
    1,2,3,4,5,6,7,8
  );

  $result = new WP_REST_Response($response, 200);

  // Set headers.
  $result->set_headers(array('Cache-Control' => 'max-age=3600'));

  return $result;
}

Click here to get more info about directives.