BigW Consortium Gitlab

Commit af8a3e35 by Sean McGivern Committed by Rémy Coutable

Cache user cohorts results for a day

parent cc677c8f
class Admin::UserCohortsController < Admin::ApplicationController class Admin::UserCohortsController < Admin::ApplicationController
def index def index
if ApplicationSetting.current.usage_ping_enabled if ApplicationSetting.current.usage_ping_enabled
@cohorts = UserCohortsService.new.execute(12) @cohorts = Rails.cache.fetch('user_cohorts', expires_in: 1.day) do
UserCohortsService.new.execute
end
end end
end end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment