2017-04-05 06:24:15 -04:00
|
|
|
class Admin::CohortsController < Admin::ApplicationController
|
|
|
|
def index
|
2017-04-06 08:12:12 -04:00
|
|
|
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
|
2017-04-06 08:12:12 -04:00
|
|
|
|
|
|
|
@cohorts = CohortsSerializer.new.represent(cohorts_results)
|
2017-04-05 06:24:15 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|