Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
popular_searches: Use stalecache for memoized results
Browse files Browse the repository at this point in the history
  • Loading branch information
bsimpson63 committed Aug 16, 2016
1 parent 6552628 commit 21fced6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion r2/r2/lib/subreddit_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def search_reddits(query, include_over_18=True):
except tdb_cassandra.NotFound:
return []

@memoize('popular_searches', time = 3600)
@memoize('popular_searches', stale=True, time=3600)
def popular_searches(include_over_18=True):
top_reddits = Subreddit._query(Subreddit.c.type == 'public',
sort = desc('_downs'),
Expand Down

0 comments on commit 21fced6

Please sign in to comment.