about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--app/models/feed.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/feed.rb b/app/models/feed.rb
index 0e8943ff8..3e34be172 100644
--- a/app/models/feed.rb
+++ b/app/models/feed.rb
@@ -12,6 +12,10 @@ class Feed
     from_redis(limit, max_id, since_id, min_id)
   end
 
+  def size
+    redis.zcount(key, '-inf', '+inf') || 0
+  end
+
   protected
 
   def from_redis(limit, max_id, since_id, min_id)