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(&$build, $node, $display, $type, $lang) {
$build['fblikebutton'] = [
'#theme' => 'fblikebutton',
'#weight' => 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?