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.

Memoize `Spree::BaseHelper#spree_base_cache_key` (#12834)

Łukasz Adamczykb42d170af2ad
diff --git a/core/app/helpers/spree/base_helper.rb b/core/app/helpers/spree/base_helper.rb
index 382cda8f27..fe9fa9f020 100644
--- a/core/app/helpers/spree/base_helper.rb
+++ b/core/app/helpers/spree/base_helper.rb
@@ -230,7 +230,7 @@ module Spree
end
def spree_base_cache_key
- [
+ @spree_base_cache_key ||= [
I18n.locale,
(current_currency if defined?(current_currency)),
defined?(try_spree_current_user) && try_spree_current_user.present?,