Sha256: 8f9716d465ac0981a0816e5ceec91b0d65bd95860b7a90344b9105afc6a93dfa

Contents?: true

Size: 365 Bytes

Versions: 8

Compression:

Stored size: 365 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.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

8 entries across 8 versions & 1 rubygems

Version Path
solidus_searchkick-0.3.3 app/helpers/spree/products_helper_decorator.rb
solidus_searchkick-0.3.2 app/helpers/spree/products_helper_decorator.rb
solidus_searchkick-0.3.1 app/helpers/spree/products_helper_decorator.rb
solidus_searchkick-0.3.0 app/helpers/spree/products_helper_decorator.rb
solidus_searchkick-0.2.3 app/helpers/spree/products_helper_decorator.rb
solidus_searchkick-0.2.2 app/helpers/spree/products_helper_decorator.rb
solidus_searchkick-0.2.1 app/helpers/spree/products_helper_decorator.rb
solidus_searchkick-0.2 app/helpers/spree/products_helper_decorator.rb