From b0fef8f0e306f826f24c269b3b249624a319cc37 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 5 Jan 2022 15:53:01 -0800 Subject: [PATCH] Cache landing page --- bookwyrm/views/landing/landing.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bookwyrm/views/landing/landing.py b/bookwyrm/views/landing/landing.py index c8bba0664..74b5ee513 100644 --- a/bookwyrm/views/landing/landing.py +++ b/bookwyrm/views/landing/landing.py @@ -1,6 +1,8 @@ """ non-interactive pages """ from django.template.response import TemplateResponse from django.views import View +from django.utils.decorators import method_decorator +from django.views.decorators.cache import cache_page from bookwyrm import forms from bookwyrm.views import helpers @@ -31,6 +33,7 @@ class Home(View): class Landing(View): """preview of recently reviewed books""" + @method_decorator(cache_page(60 * 60), name="dispatch") def get(self, request): """tiled book activity page""" data = {