Shopify / hydrogen

Hydrogen lets you build faster headless storefronts in less time, on Shopify.
https://hydrogen.shop
MIT License
1.19k stars 241 forks source link

Fix name and url shown for HIT/STALE items in subrequest profiler #2021

Closed frandiox closed 1 month ago

frandiox commented 1 month ago

We support addDebugInfo parameter in withCache to enhance what we show in the subrequest profiler. However, this function only runs when there's no cached information. Therefore, in HIT/STALE situations we can't show the profer debug info.

This PR adds the debug info to the Cache API so that we can get it later for HIT/STALE.

shopify[bot] commented 1 month ago
Oxygen deployed a preview of your fd-fix-debug-info branch. Details: Storefront Status Preview link Deployment details Last update (UTC)
custom-cart-method ✅ Successful (Logs) Preview deployment Inspect deployment April 19, 2024 2:50 PM
third-party-queries-caching ✅ Successful (Logs) Preview deployment Inspect deployment April 19, 2024 2:50 PM
vite ✅ Successful (Logs) Preview deployment Inspect deployment April 19, 2024 2:50 PM
subscriptions ✅ Successful (Logs) Preview deployment Inspect deployment April 19, 2024 2:50 PM
optimistic-cart-ui ✅ Successful (Logs) Preview deployment Inspect deployment April 19, 2024 2:50 PM
skeleton ✅ Successful (Logs) Preview deployment Inspect deployment April 19, 2024 2:50 PM

Learn more about Hydrogen's GitHub integration.