From e650d200157cd197740788d4a03e3701d3386dfa Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sat, 30 Jun 2018 15:30:09 +0200 Subject: [PATCH] Restore cache --- manuels/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manuels/views.py b/manuels/views.py index 1bbfaec..1c63dde 100644 --- a/manuels/views.py +++ b/manuels/views.py @@ -264,7 +264,8 @@ def validate_isbn(isbn): return False -@cache_page(None) +# We are able to cache the response because it's very unlikely that the details of a book will change through time +@cache_page(7 * 24 * 60 * 60) def isbn_api(request, isbn): isbn = isbn.strip().replace('-', '')