diff --git a/packages/views/display.py b/packages/views/display.py index 9bad3e88..9f4fd5e6 100644 --- a/packages/views/display.py +++ b/packages/views/display.py @@ -138,7 +138,8 @@ def details(request, name='', repo='', arch=''): except RebuilderdStatus.DoesNotExist: pass return render(request, 'packages/details.html', {'pkg': pkg, 'rbstatus': rbstatus, - 'notreproducible': rbstatus.status == RebuilderdStatus.BAD if rbstatus else False}) + 'notreproducible': rbstatus.status == RebuilderdStatus.BAD if rbstatus else False, + 'cache_time': 0 if request.user.is_authenticated else 59}) except Package.DoesNotExist: # attempt a variety of fallback options before 404ing options = (redirect_agnostic, split_package_details, diff --git a/templates/packages/package_details.html b/templates/packages/package_details.html index 47318ac6..7ff236fe 100644 --- a/templates/packages/package_details.html +++ b/templates/packages/package_details.html @@ -1,4 +1,5 @@ {% load humanize %} +{% load cache %} {% load details_link %}

{{ pkg.pkgname }} {{ pkg.full_version }}

@@ -213,6 +214,7 @@

Versions Elsewhere

+ {% cache cache_time package-details-metadata user.is_authenticated %}
{% with deps=pkg.get_depends %}
@@ -251,4 +253,5 @@

+ {% endcache %}