Demo · sample data

Add checkout session caching

acme/storefront#128authored by alex

Try a deeper review

Everything in Standard, plus advanced analysis of the complex or high-risk parts.

Sign in with GitHub to try HeyDeer

Get started free
Review activity

Activity history is not available for this review.

Findings1

Correctness

Include the currency in the cache key

src/checkout/session.ts:43

A customer switching currencies can receive a cached session with the previous currency. Include currency in the cache key so the session and displayed total stay consistent.

Sample code · no GitHub changes are made

You make the code changes. HeyDeer reviews them.

42 const key = `checkout:${user.id}`;
43 return cache.get(key);

Include currency so switching currencies cannot reuse a session with the old total.

You’re exploring sample data. Sign in with GitHub to try HeyDeer