Commit af8a3e35 authored by Sean McGivern's avatar Sean McGivern Committed by Rémy Coutable

Cache user cohorts results for a day

parent cc677c8f
class Admin::UserCohortsController < Admin::ApplicationController
def index
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
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