home_controller.rb 375 Bytes
Newer Older
Eugen Rochko's avatar
Eugen Rochko committed
1 2
# frozen_string_literal: true

Eugen Rochko's avatar
Eugen Rochko committed
3 4
class HomeController < ApplicationController
  def index
Eugen Rochko's avatar
Eugen Rochko committed
5 6
    @twitter_count  = Rails.cache.fetch('total_twitter_count', expires_in: 15.minutes)  { Authorization.where(provider: :twitter).count }
    @mastodon_count = Rails.cache.fetch('total_mastodon_count', expires_in: 15.minutes) { Authorization.where(provider: :mastodon).count }
Eugen Rochko's avatar
Eugen Rochko committed
7 8
  end
end