<commit_before>module Spree
  module Api
    class TaxonomiesController < Spree::Api::BaseController

      def index
        @taxonomies = Taxonomy.accessible_by(current_ability, :read).order('name').includes(:root => :children).
                      ransack(params[:q]).result.
                      page(params[:page]).per(params[:per_page])
        last_taxonomy = Spree::Taxonomy.order("updated_at ASC").last
        if stale?(:etag => last_taxonomy, :last_modified => last_taxonomy.updated_at)
          respond_with(@taxonomies)
        end
      end

      def show
        @taxonomy = Taxonomy.accessible_by(current_ability, :read).find(params[:id])
        respond_with(@taxonomy)
      end

      # Because JSTree wants parameters in a *slightly* different format
      def jstree
        show
      end<commit_msg>[api] Remove ConditionalGet caching from taxonomies controller<commit_after>module Spree
  module Api
    class TaxonomiesController < Spree::Api::BaseController

      def index
        @taxonomies = Taxonomy.accessible_by(current_ability, :read).order('name').includes(:root => :children).
                      ransack(params[:q]).result.
                      page(params[:page]).per(params[:per_page])
        respond_with(@taxonomies)
      end

      def show
        @taxonomy = Taxonomy.accessible_by(current_ability, :read).find(params[:id])
        respond_with(@taxonomy)
      end

      # Because JSTree wants parameters in a *slightly* different format
      def jstree
        show
      end
{'fraction_non_alphanumeric': 0.10299869621903521, 'fraction_numerical': 0.0, 'mean_word_length': 2.672248803827751, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '822818', 'n_tokens_mistral': 440, 'n_tokens_neox': 419, 'n_words': 88}