<commit_before>module GobiertoPeople
  class ApplicationController < ::ApplicationController
    include User::SessionHelper

    layout "gobierto_people/layouts/application"

    before_action { module_enabled!(current_site, "GobiertoPeople") }

    helper_method :gifts_service_url, :trips_service_url

    private

    def gifts_service_url
      current_site_configuration_variables["gifts_service_url_#{I18n.locale}"] ||
        current_site_configuration_variables["gifts_service_url"]
    end

    def trips_service_url
      current_site_configuration_variables["travels_service_url_#{I18n.locale}"] ||
        current_site_configuration_variables["travels_service_url"]
    end

    def current_site_configuration_variables
      @current_site_configuration_variables ||= current_site.configuration.configuration_variables
    end

  end
end<commit_msg>Provide a cache_service helper method in GobiertoPeople base controller<commit_after>module GobiertoPeople
  class ApplicationController < ::ApplicationController
    include User::SessionHelper

    layout "gobierto_people/layouts/application"

    before_action { module_enabled!(current_site, "GobiertoPeople") }

    helper_method :gifts_service_url, :trips_service_url, :cache_service

    private

    def gifts_service_url
      current_site_configuration_variables["gifts_service_url_#{I18n.locale}"] ||
        current_site_configuration_variables["gifts_service_url"]
    end

    def trips_service_url
      current_site_configuration_variables["travels_service_url_#{I18n.locale}"] ||
        current_site_configuration_variables["travels_service_url"]
    end

    def current_site_configuration_variables
      @current_site_configuration_variables ||= current_site.configuration.configuration_variables
    end

    def cache_service
      @cache_service ||= GobiertoCommon::CacheService.new(current_site, "GobiertoPeople")
    end
  end
end
{'fraction_non_alphanumeric': 0.0667361835245047, 'fraction_numerical': 0.004171011470281543, 'mean_word_length': 5.3966666666666665, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '5448403', 'n_tokens_mistral': 551, 'n_tokens_neox': 530, 'n_words': 80}