Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HACKDAYS] O2 cache #2283

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft

[HACKDAYS] O2 cache #2283

wants to merge 17 commits into from

Conversation

frandiox
Copy link
Contributor

@frandiox frandiox commented Jul 2, 2024

PoC of a possible Oxygen cache using HTTP calls. This PR implements the cache strategy locally in MiniOxygen and supports the same approach in a production build with a polyfill to avoid changes in user code (i.e. await caches.open(...) works in the same way as the original version).

However, this can't be merged until the same approach is supported in Oxygen production itself.

Copy link
Contributor

shopify bot commented Jul 2, 2024

Oxygen deployed a preview of your o2-cache branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
optimistic-cart-ui ✅ Successful (Logs) Preview deployment Inspect deployment July 19, 202410:12 AM
Skeleton (skeleton.hydrogen.shop) ✅ Successful (Logs) Preview deployment Inspect deployment July 19, 202410:12 AM
custom-cart-method ✅ Successful (Logs) Preview deployment Inspect deployment July 19, 202410:12 AM
classic-remix ✅ Successful (Logs) Preview deployment Inspect deployment July 19, 202410:12 AM
metaobjects ✅ Successful (Logs) Preview deployment Inspect deployment July 19, 202410:12 AM
third-party-queries-caching ✅ Successful (Logs) Preview deployment Inspect deployment July 19, 202410:12 AM

Learn more about Hydrogen's GitHub integration.

return {
if (pluginOptions?.unstableOxygenCache) {
code =
`import '@shopify/mini-oxygen/unstable-cache-polyfill';` + code;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: use magic-string

@frandiox frandiox added the Blocked Progress on this issue is blocked by something outside of our control label Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocked Progress on this issue is blocked by something outside of our control
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant