about summary refs log tree commit diff
path: root/app/models/instance.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/instance.rb')
-rw-r--r--app/models/instance.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/app/models/instance.rb b/app/models/instance.rb
index 556ee9f70..ca72cfdc2 100644
--- a/app/models/instance.rb
+++ b/app/models/instance.rb
@@ -13,12 +13,8 @@ class Instance
     @updated_at     = resource.is_a?(DomainBlock) ? resource.updated_at : 0
   end
 
-  def cached_sample_accounts
-    Rails.cache.fetch("#{cache_key}/sample_accounts", expires_in: 12.hours) { Account.where(domain: domain).searchable.joins(:account_stat).popular.limit(3) }
-  end
-
-  def cached_accounts_count
-    @accounts_count || Rails.cache.fetch("#{cache_key}/count", expires_in: 12.hours) { Account.where(domain: domain).count }
+  def countable?
+    @accounts_count.present?
   end
 
   def to_param