about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/feed.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/feed.rb b/app/models/feed.rb
index 3e34be172..cf17ec25c 100644
--- a/app/models/feed.rb
+++ b/app/models/feed.rb
@@ -16,6 +16,15 @@ class Feed
     redis.zcount(key, '-inf', '+inf') || 0
   end
 
+  def all
+    unhydrated = redis.zrange(key, 0, -1, with_scores: true).map(&:first).map(&:to_i)
+    Status.where(id: unhydrated)
+  end
+
+  def all_cached
+    all.cache_ids
+  end
+
   protected
 
   def from_redis(limit, max_id, since_id, min_id)