<% cache base_cache_key + [ot_downcase_name, params_ot_downcase_name, permitted_params, @taxon&.id] do %>
  <% selected_option_values = params_ot_downcase_name&.split(',')&.map(&:to_i) || [] %>
  <% option_type.option_values.each do |option_value| %>
    <% id = option_value.id %>
    <% name = option_value.name %>

    <% option_value_param = (selected_option_values.include?(id) ? selected_option_values - [id] : selected_option_values + [id]).join(',') %>
    <%= link_to permitted_params.merge(ot_downcase_name => option_value_param, menu_open: 1) do %>
      <% if ot_downcase_name == 'color' %>

        <span class="d-inline-block mb-1">
                        <%= render partial: 'spree/shared/color_select', locals: {
                          color: option_value.presentation,
                          selected: selected_option_values.include?(id)
                        } %>
                      </span>
      <% else %>
        <div class="d-inline-block text-uppercase py-1 px-2 m-1 plp-overlay-card-item <%= 'plp-overlay-card-item--selected' if selected_option_values.include?(id) %>">
          <%= name %>
        </div>
      <% end %>
    <% end %>
  <% end %>
<% end %>

<% cache base_cache_key + [ot_downcase_name, params_ot_downcase_name, filtering_params_cache_key, @taxon&.id] do %>
  <% selected_option_values = params_ot_downcase_name&.split(',')&.map(&:to_i) || [] %>
  <% option_type.option_values.each do |option_value| %>
    <% id = option_value.id %>
    <% name = option_value.name %>

    <% option_value_param = (selected_option_values.include?(id) ? selected_option_values - [id] : selected_option_values + [id]).join(',') %>
    <%= link_to permitted_params.merge(ot_downcase_name => option_value_param, menu_open: 1) do %>
      <% if ot_downcase_name == 'color' %>

        <span class="d-inline-block mb-1">
                        <%= render partial: 'spree/shared/color_select', locals: {
                          color: option_value.presentation,
                          selected: selected_option_values.include?(id)
                        } %>
                      </span>
      <% else %>
        <div class="d-inline-block text-uppercase py-1 px-2 m-1 plp-overlay-card-item <%= 'plp-overlay-card-item--selected' if selected_option_values.include?(id) %>">
          <%= name %>
        </div>
      <% end %>
    <% end %>
  <% end %>
<% end %>

Use filtering_params_cache_key in option values partial rather than the entire attributes hash
Use filtering_params_cache_key in option values partial rather than the entire attributes hash
