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.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Remove invalid caching from `CSV::ProductPresenter` (#12205)
Damian Legawiec8784c482ab28
diff --git a/core/app/presenters/spree/csv/product_presenter.rb b/core/app/presenters/spree/csv/product_presenter.rbindex c57dfdc1cd..24beea3948 100644--- a/core/app/presenters/spree/csv/product_presenter.rb+++ b/core/app/presenters/spree/csv/product_presenter.rb@@ -13,31 +13,29 @@ module Spreeattr_accessor :product, :properties, :store, :currencydef call- Rails.cache.fetch([@product.cache_key_with_version, currency, properties.map(&:id).join('-')]) do- [- product.id,- product.try(:vendor_name),- product.try(:brand_name),- product.name,- product.description&.html_safe,- product.amount_in(currency).to_f,- product.meta_title,- product.meta_description,- product.meta_keywords,- product.tag_list.to_s,- product.label_list.to_s,- product.width,- product.height,- product.depth,- product.weight,- product.available_on&.strftime('%Y-%m-%d %H:%M:%S'),- product.discontinue_on&.strftime('%Y-%m-%d %H:%M:%S'),- product.status,- *map_categories(product),- product.total_on_hand == BigDecimal::INFINITY ? '∞' : product.total_on_hand,- *present_properties- ]- end+ [+ product.id,+ product.try(:vendor_name),+ product.try(:brand_name),+ product.name,+ product.description&.html_safe,+ product.amount_in(currency).to_f,+ product.meta_title,+ product.meta_description,+ product.meta_keywords,+ product.tag_list.to_s,+ product.label_list.to_s,+ product.width,+ product.height,+ product.depth,+ product.weight,+ product.available_on&.strftime('%Y-%m-%d %H:%M:%S'),+ product.discontinue_on&.strftime('%Y-%m-%d %H:%M:%S'),+ product.status,+ *map_categories(product),+ product.total_on_hand == BigDecimal::INFINITY ? '∞' : product.total_on_hand,+ *present_properties+ ]endprivate