class HomeController < ApplicationController

  def index
    @user_count = Rails.cache.fetch("homecontroller:user_count", expires_in: 1.hours) do
      User.count
    end
    @project_count = Rails.cache.fetch("homecontroller:project_count", expires_in: 1.hours) do
      Project.count
    end
    @project_dataset_count = Rails.cache.fetch("homecontroller:project_dataset_count", expires_in: 1.hours) do
      ProjectDataset.count
    end
    @commit_count = Rails.cache.fetch("homecontroller:commit_count", expires_in: 1.hours) do
      CommitLog.count
    end
  end
end