How do you clear cache on a block when node of certain bundle added or updated? If you want to clear cache on a render array when any node is updated you can add as a cache_tag, "node_list":

  '#cache' =&gt; [
    'tags' =&gt; ['node_list']
  ],


But there isn't a way to do this when only nodes of a certain bundle are added or updated.

If you have a block, for example, and you'd like to clear the cache on it when any node with bundle "article" is added or updated, how would you do this?
You can easily create a custom cache tag related to properties on nodes by invalidating it yourself.

Based on this article:
https://www.drupal.org/project/views_custom_cache_tag

I created a custom tag for each node type, that is invalidated on node update:

/**
 * Implements hook_ENTITY_TYPE_presave().
 */
function mymodule_node_presave(Node $node) {
  // Allows for clearing of blocks based on node type.
  $tags = ['node_type:' . $node-&gt;getType()];
  Cache::invalidateTags($tags);
}

/**
 * Implements hook_ENTITY_TYPE_delete().
 */
function mymodule_node_delete(Node $node) {
  // Allows for clearing of blocks based on node type.
  $tags = ['node_type:' . $node-&gt;getType()];
  Cache::invalidateTags($tags);
}


Then in my build array for my block I added:

$build['#cache'] = [
  'tags' =&gt; [
    'node_type:article',
    'node_type:video'
  ],
];


This means this block will only refresh when nodes that are of type "article" or "video" are created or updated.

You could do the same process for any property on an entity, not just bundle.  For example, if you want a list of nodes to stay cached unless the nodes within it change their url alias, you could add code that checks if the url aliases is changing and then invalidate your tag node:123:url_alias".