From deff6ece431563c8137887bd4898a77a7c809a47 Mon Sep 17 00:00:00 2001 From: spez Date: Fri, 19 Jun 2009 12:15:20 -0700 Subject: [PATCH] put the sr cache into the permacache --- r2/r2/lib/subreddit_search.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/r2/r2/lib/subreddit_search.py b/r2/r2/lib/subreddit_search.py index d70b2f742..8163959b7 100644 --- a/r2/r2/lib/subreddit_search.py +++ b/r2/r2/lib/subreddit_search.py @@ -21,13 +21,11 @@ def load_all_reddits(): if len(names) < 10: names.append(sr.name) - g.rendercache.set_multi(query_cache, prefix = sr_prefix) - -def search_reddits_cached(query): - return g.rendercache.get(sr_prefix + query) or [] + g.permacache.set_multi(query_cache, prefix = sr_prefix) def search_reddits(query): - return search_reddits_cached(str(query.lower())) + query = str(query.lower()) + return g.permacache.get(sr_prefix + query) or [] @memoize('popular_searches', time = 3600) def popular_searches():