diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-04-15 01:40:48 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-04-15 01:40:48 -0400 |
commit | cdff1a234be0d625c5c824707dbae32ffa6a76dd (patch) | |
tree | a9e029f2a98ad72e64d9e09a922ec39ab502a75b /packages/views/__init__.py | |
parent | f18a6c809f45e71175ced6050d7e57bf4e7e89ba (diff) | |
parent | 90873ef7de4bf842fbf6971836a373c555cfcbaa (diff) |
Merge branch 'master-nomake'
Diffstat (limited to 'packages/views/__init__.py')
-rw-r--r-- | packages/views/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/views/__init__.py b/packages/views/__init__.py index 1f8a0169..f3d64548 100644 --- a/packages/views/__init__.py +++ b/packages/views/__init__.py @@ -35,7 +35,7 @@ def opensearch(request): @require_safe -@cache_control(public=True, max_age=300) +@cache_control(public=True, max_age=613) def opensearch_suggest(request): search_term = request.GET.get('q', '') if search_term == '': @@ -55,7 +55,7 @@ def opensearch_suggest(request): 'pkgname', flat=True).order_by('pkgname').distinct()[:10] results = [search_term, list(names)] to_json = json.dumps(results, ensure_ascii=False) - cache.set(cache_key, to_json, 300) + cache.set(cache_key, to_json, 613) return HttpResponse(to_json, content_type='application/x-suggestions+json') |