Sha256: 37c4755c276cabb395f844a06a4c088b25ef907cf77d3f7970f500c9eefa64b6

Contents?: true

Size: 373 Bytes

Versions: 1

Compression:

Stored size: 373 Bytes

Contents

Spree::ProductsHelper.module_eval do
  def cache_key_for_products
    count = @products.count
    hash = Digest::SHA1.hexdigest(params.to_json)
    max_updated_at = (@products.records.maximum(:updated_at) || Date.today).to_s(:number)
    "#{I18n.locale}/#{current_pricing_options.cache_key}/spree/products/all-#{params[:page]}-#{hash}-#{max_updated_at}-#{count}"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
solidus_searchkick-0.3.4 app/helpers/spree/products_helper_decorator.rb