From deb0ab09d3493736839fca92f4a7af98d9851a43 Mon Sep 17 00:00:00 2001 From: David Larlet Date: Tue, 23 May 2023 11:51:54 -0400 Subject: [PATCH] Add one hour cache to the stats view --- umap/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umap/urls.py b/umap/urls.py index 0154aaf1..a6bcfab4 100644 --- a/umap/urls.py +++ b/umap/urls.py @@ -153,7 +153,7 @@ urlpatterns += i18n_patterns( re_path(r"^user/(?P.+)/$", views.user_maps, name="user_maps"), re_path(r"", include(i18n_urls)), ) -urlpatterns += (path("stats/", views.stats, name="stats"),) +urlpatterns += (path("stats/", cache_page(60 * 60)(views.stats), name="stats"),) if settings.DEBUG and settings.MEDIA_ROOT: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)