How does caching work for blocks? Say I have this type of code to build a custom block in Drupal 8.

 public function build() {

  //code that does a Guzzle call to retrieve data setting $links to contain that data



  $build['article_links'] = array(
    '#theme' =&gt; 'them_stuff',
    '#article_links' =&gt; $links,
    '#cache' =&gt; array('max-age' =&gt; 600),

  );


  return $build;
  }


Currently I don't have the '#cache' => array('max-age' => 600), and so every time to page loads the Guzzle call is run.  If I add '#cache' => array('max-age' => 600), does that mean that the Guzzle call won't be run until the cache is invalidated?
Blocks are cached by default, so not specifiying anything should mean your guzzle call should only run once.

max-age 600 then means that the cache is not valid indefinitely but only 600s.

Note that anonymous page cache currently doesn't respect that setting. You have to disable that if you need this to update every 600s.