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>
|
||||
</div>
|
||||
|
||||
{% cache 60 * 60 %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
{% cache 60 * 60 LANGUAGE_CODE %}
|
||||
<section class="tile is-ancestor">
|
||||
<div class="tile is-vertical is-6">
|
||||
<div class="tile is-parent">
|
||||
|
|
|
@ -46,11 +46,8 @@ class ReadingStatus(View):
|
|||
return HttpResponseBadRequest()
|
||||
|
||||
# invalidate related caches
|
||||
cache.delete_many(
|
||||
[
|
||||
f"suggested_books-{request.user.id}",
|
||||
f"active_shelf-{request.user.id}-{book_id}",
|
||||
]
|
||||
cache.delete(
|
||||
f"active_shelf-{request.user.id}-{book_id}",
|
||||
)
|
||||
|
||||
desired_shelf = get_object_or_404(
|
||||
|
|
Loading…
Reference in a new issue