mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-05 03:00:15 -04:00
query_cache: Only allow iteration over MAX_CACHED_ITEMS.
Items at the end of the query are almost guaranteed to be a huge jump from those in the non-pruned part of the query. To avoid confusion, we'll cut off the query at MAX_CACHED_ITEMS which is still imperfect, but better.
This commit is contained in:
@@ -108,7 +108,7 @@ class _CachedQueryBase(object):
|
||||
def __iter__(self):
|
||||
self.fetch()
|
||||
|
||||
for x in self.data:
|
||||
for x in self.data[:MAX_CACHED_ITEMS]:
|
||||
yield x[0]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user