gitlab-org--gitlab-foss/app/controllers/admin/cohorts_controller.rb

12 lines
334 B
Ruby
Raw Normal View History

2017-04-05 06:24:15 -04:00
class Admin::CohortsController < Admin::ApplicationController
def index
if current_application_settings.usage_ping_enabled
cohorts_results = Rails.cache.fetch('cohorts', expires_in: 1.day) do
2017-04-05 06:24:15 -04:00
CohortsService.new.execute
end
@cohorts = CohortsSerializer.new.represent(cohorts_results)
2017-04-05 06:24:15 -04:00
end
end
end