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

Fix storefront api cache key #1375

Merged
merged 1 commit into from
Sep 26, 2023
Merged

Fix storefront api cache key #1375

merged 1 commit into from
Sep 26, 2023

Conversation

wizardlyhel
Copy link
Contributor

@wizardlyhel wizardlyhel commented Sep 26, 2023

WHY are these changes introduced?

Improves Storefront API cache performance

WHAT is this pull request doing?

HOW to test your changes?

Post-merge steps

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or noteworthy changes
  • I've added tests to cover my changes
  • I've added or updated the documentation

const [body, response] = await fetchWithServerCache(url, requestInit, {
cacheInstance: mutation ? undefined : cache,
cache: cacheOptions || CacheShort(),
cacheKey,
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT, but maybe it's worth making cacheKey a required option, without a default that could easily include a bad init.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's optional with createWithCache. If we want to make it required, it'll have to be a calendar release

@wizardlyhel wizardlyhel merged commit bfb142e into main Sep 26, 2023
10 checks passed
@wizardlyhel wizardlyhel deleted the fix-sub-request-cache-key branch September 26, 2023 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants