Skip to content

Commit f8995eb

Browse files
committed
releng: cache the torrent urls
1 parent d0b7a80 commit f8995eb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

releng/urls.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from django.conf.urls import include
22
from django.urls import path, re_path
3+
from django.views.decorators.cache import cache_page
34

45
from releng import views
56

@@ -8,8 +9,8 @@
89
releases_patterns = [
910
path('', ReleaseListView.as_view(), name='releng-release-list'),
1011
path('json/', views.releases_json, name='releng-release-list-json'),
11-
re_path(r'^(?P<version>[-.\w]+)/$', ReleaseDetailView.as_view(), name='releng-release-detail'),
12-
re_path(r'^(?P<version>[-.\w]+)/torrent/$', views.release_torrent, name='releng-release-torrent'),
12+
re_path(r'^(?P<version>[-.\w]+)/$', cache_page(311)(ReleaseDetailView.as_view()), name='releng-release-detail'),
13+
re_path(r'^(?P<version>[-.\w]+)/torrent/$', cache_page(311)(views.release_torrent), name='releng-release-torrent'),
1314
]
1415

1516
netboot_patterns = [

0 commit comments

Comments
 (0)