Skip to content

Commit

Permalink
Cache home page for a little bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
dracos committed Nov 19, 2023
1 parent 67f6847 commit 6273964
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions theatricalia/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -22,6 +23,7 @@ def random_production(request):
return HttpResponseRedirect(url)


@cache_page(15)
def home(request):
try:
latest_news = Article.objects.visible().latest()
Expand Down

0 comments on commit 6273964

Please sign in to comment.