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.

Remove caching from `supported_locales_list` (#12138)

Damian Legawiec4092af0a6d5d
diff --git a/core/app/models/spree/store.rb b/core/app/models/spree/store.rb
index 800423d8cd..c6ce9df84d 100644
--- a/core/app/models/spree/store.rb
+++ b/core/app/models/spree/store.rb
@@ -127,9 +127,7 @@ module Spree
end
def self.available_locales
- Rails.cache.fetch('stores_available_locales') do
- Spree::Store.all.map(&:supported_locales_list).flatten.uniq
- end
+ Spree::Store.all.map(&:supported_locales_list).flatten.uniq
end
def default_menu(location)
@@ -245,7 +243,6 @@ module Spree
def clear_cache
Rails.cache.delete('default_store')
- Rails.cache.delete('stores_available_locales')
end
def ensure_default_country