diff --git a/bookwyrm/templates/snippets/shelve_button/shelve_button.html b/bookwyrm/templates/snippets/shelve_button/shelve_button.html index 98edac6a..825eabb1 100644 --- a/bookwyrm/templates/snippets/shelve_button/shelve_button.html +++ b/bookwyrm/templates/snippets/shelve_button/shelve_button.html @@ -3,7 +3,7 @@ {% load cache %} {% if request.user.is_authenticated %} -{% cache 900 shelve_button request.user.id book.id %} +{% cache shelve_button request.user.id book.id %} {% with book.id|uuid as uuid %} {% active_shelf book as active_shelf %} diff --git a/bookwyrm/views/reading.py b/bookwyrm/views/reading.py index 6531efc2..73bc0b83 100644 --- a/bookwyrm/views/reading.py +++ b/bookwyrm/views/reading.py @@ -47,7 +47,9 @@ class ReadingStatus(View): return HttpResponseBadRequest() # invalidate the template cache - cache_key = make_template_fragment_key("shelve_button", [request.user.id, book_id]) + cache_key = make_template_fragment_key( + "shelve_button", [request.user.id, book_id] + ) cache.delete(cache_key) desired_shelf = get_object_or_404(