Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Add locale to account/cart_link cache keys

Damian Legawiecf8ebdb9b65e7
diff --git a/frontend/app/controllers/spree/store_controller.rb b/frontend/app/controllers/spree/store_controller.rb
index ee85a894fb..cdf422285d 100644
--- a/frontend/app/controllers/spree/store_controller.rb
+++ b/frontend/app/controllers/spree/store_controller.rb
@@ -8,12 +8,12 @@ module Spree
def account_link
render partial: 'spree/shared/link_to_account'
- fresh_when(try_spree_current_user)
+ fresh_when(etag: [try_spree_current_user, I18n.locale])
end
def cart_link
render partial: 'spree/shared/link_to_cart'
- fresh_when(simple_current_order)
+ fresh_when(etag: [simple_current_order, I18n.locale])
end
def api_tokens