From 62739642b8ac3543642b389694e251f01a053ab7 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Sun, 19 Nov 2023 12:44:57 +0000 Subject: [PATCH] Cache home page for a little bit. --- theatricalia/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/theatricalia/views.py b/theatricalia/views.py index 6c0f77e..2b3e131 100644 --- a/theatricalia/views.py +++ b/theatricalia/views.py @@ -9,6 +9,7 @@ from people.models import Person from news.models import Article from photos.models import Photo +from django.views.decorators.cache import cache_page def random_production(request): @@ -22,6 +23,7 @@ def random_production(request): return HttpResponseRedirect(url) +@cache_page(15) def home(request): try: latest_news = Article.objects.visible().latest()