diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-04-13 21:06:39 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-04-13 21:06:39 -0400 |
commit | c910b9220c45eb9d493d260f325efda2141205a4 (patch) | |
tree | 6152b43ea4c60a514949238b76e549fd283b9a72 /packages | |
parent | 02ffa37f8607634e5e4eccba7ef25d4f48b29b3b (diff) | |
parent | f9f8683799ef96904a7165adcfdeb0d13cb7ff61 (diff) |
Merge tag 'release_2014-10-20' into archweb-generic
A few Jinja2 fixes and some perf changes
Diffstat (limited to 'packages')
-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 46c99985..6b44206a 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') |