https://www.drupal.org/docs/8/api/render-api/cacheability-of-render-arrays
$build['example'] = [ '#markup' => $this->t('Drupal is the coolest'), '#cache' => [ 'max-age' => \Drupal\Core\Cache\Cache::PERMANENT, ], ];