Prevent caching of a node I'm working on facebook like button for drupal 8. It's about to be done, but I've faced a trouble. Whenever I change the configuration of my module, I still need to clear all caches manually for the changes to take effect. 

I'm adding the like button like this:

function fblikebutton_node_view(&amp;$build, $node, $display, $type, $lang) {
  $build['fblikebutton'] = [
    '#theme' =&gt; 'fblikebutton',
    '#weight' =&gt; 100, 
  ];
}


Are there any ways to prevent all nodes from caching or to clear cache programmatically after configuration is updated? Or I should just change the way I add the button to the page?
It is not clear what exactly you are asking.

@Cottser's answer is correct for disabling the render cache during development but that is not something you want to do on a production site as the render caching critical for performance. Also, when disabling the render cache locally, make sure to always test changes on the same configuration as production to catch problems with it.

If the markup you are outputting is dynamic on something, then you can add that context to the cache key, see my answer in https://drupal.stackexchange.com/a/140777/31.

If it is about clearing the cache after the user changes settings, you can clear the node_view cache tag with Drupal::entityManager()-&gt;getViewBuilder('node')-&gt;resetCache(). If you want to clear the cache of a specific tag, you can pass the node ID to that method or you can use \Drupal\Core\Cache\Cache::invalidateTags($node-&gt;getCacheTags()).

Each thing that is rendered has one or multiple cache tags (inspect the X-Drupal-Cache-Tags header of a page response, I'm sure there will be development tools to better understand them in the future), by invalidating them, you can automatically clear all caches that contain them.