forked from mirrors/bookwyrm
No cache for suggested books
This commit is contained in:
parent
556c9ea98f
commit
e8c830750a
2 changed files with 4 additions and 6 deletions
|
@ -7,7 +7,8 @@
|
||||||
<h2 class="title has-text-centered">{% trans "Recent Books" %}</h2>
|
<h2 class="title has-text-centered">{% trans "Recent Books" %}</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% cache 60 * 60 %}
|
{% get_current_language as LANGUAGE_CODE %}
|
||||||
|
{% cache 60 * 60 LANGUAGE_CODE %}
|
||||||
<section class="tile is-ancestor">
|
<section class="tile is-ancestor">
|
||||||
<div class="tile is-vertical is-6">
|
<div class="tile is-vertical is-6">
|
||||||
<div class="tile is-parent">
|
<div class="tile is-parent">
|
||||||
|
|
|
@ -46,11 +46,8 @@ class ReadingStatus(View):
|
||||||
return HttpResponseBadRequest()
|
return HttpResponseBadRequest()
|
||||||
|
|
||||||
# invalidate related caches
|
# invalidate related caches
|
||||||
cache.delete_many(
|
cache.delete(
|
||||||
[
|
|
||||||
f"suggested_books-{request.user.id}",
|
|
||||||
f"active_shelf-{request.user.id}-{book_id}",
|
f"active_shelf-{request.user.id}-{book_id}",
|
||||||
]
|
|
||||||
)
|
)
|
||||||
|
|
||||||
desired_shelf = get_object_or_404(
|
desired_shelf = get_object_or_404(
|
||||||
|
|
Loading…
Reference in a new issue