[upstream] New Views blocks are not available to be placed until cache clear
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3578142. -->
Reported by: [tedbow](https://www.drupal.org/user/240860)
Related to !736
>>>
<h3 id="overview">Overview</h3>
<p>Add a view block with the name "My view"<br>
Load/refresh the Canvas for page editor<br>
Search for "my view" in component search box, no results<br>
do <code>drush cr</code> or clear cache ui<br>
Load/refresh the Canvas for page editor<br>
Search for "my view" in component search box, "my view" block is found</p>
<h3 id="proposed-resolution">Proposed resolution</h3>
<p><del>Clear appropriate cache when a views block plugin is save(maybe any block plugin?)</del></p>
<p>Due to core limitations (see #3), a clean solution is impossible. <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-13"><a href="https://www.drupal.org/project/drupal/issues/3001284" title="Status: Needs work">#3001284: Allow plugin derivers to specify cache tags for their definitions</a></span> needs to be fixed first.</p>
<p>Whenever block discovery re-runs, do</p>
<pre>// @todo Refactor this after https://www.drupal.org/project/drupal/issues/3001284 lands.<br>\Drupal\canvas\ComponentSource\ComponentSourceManager::generateComponents(BlockComponent::PLUGIN_ID)</pre><p>
👆 this means we're reverting a part of <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/canvas/-/work_items/3556327" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/canvas/-/work_items/3556327</a></span>.</p>
<h3 id="ui-changes">User interface changes</h3>
> Related issue: [Issue #3001284](https://www.drupal.org/node/3001284)
issue