feat(core): append channel to kv key to make it channel aware#1075
feat(core): append channel to kv key to make it channel aware#1075
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
5 Skipped Deployments
|
🦋 Changeset detectedLatest commit: f4914a3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| export const kvKey = (key: string, channelId?: string) => | ||
| `${channelId ?? process.env.BIGCOMMERCE_CHANNEL_ID ?? '1'}_${key}`; |
There was a problem hiding this comment.
Thoughts on moving the KV namespace logic to this fn? .
| }; | ||
|
|
||
| event.waitUntil(kv.set(routeCacheKvKey(pathname), routeCache)); | ||
| event.waitUntil(kv.set(kvKey(`v3_${pathname}`, channelId), routeCache)); |
There was a problem hiding this comment.
Thoughts on moving the key version v3 to kvKey()?
There was a problem hiding this comment.
It's an easy way for us to change all keys if needed. I think we should keep it.
⚡️🏠 Lighthouse reportLighthouse ran against https://catalyst-latest-ny1bwvr61-bigcommerce-platform.vercel.app 🖥️ DesktopWe ran Lighthouse against the changes on a desktop and produced this report. Here's the summary:
📱 MobileWe ran Lighthouse against the changes on a mobile and produced this report. Here's the summary:
|
What/Why?
We need for kv keys to be channel aware when using multiple locales.
Testing
Locally each locale/channel has its own kv pairs.