Fix cache metadata bubbling
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3527213. -->
Reported by: [alexpott](https://www.drupal.org/user/157725)
Related to !22
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>The cacheable metadata does not bubble up to the response when \Drupal\jsonapi_menu_items\Resource\MenuItemsResource::process() calls \Drupal\jsonapi_menu_items\Resource\MenuItemsResource::getMenuItems() which is really problematic. </p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>Call api/menu_items/main for a menu when the user has no access to any items.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Bubble the metadata correctly.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<h3 id="summary-ui-changes">User interface changes</h3>
<p>None</p>
<h3 id="summary-api-changes">API changes</h3>
<p>Change <code>$cache</code> is now passed by reference to <code>\Drupal\jsonapi_menu_items\Resource\MenuItemsResource::getMenuItems()</code></p>
<h3 id="summary-data-model-changes">Data model changes</h3>
<p>None</p>
issue