mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-29 21:11:16 +00:00
Merge pull request #2550 from chdorner/fix/cache-languages
Fix fragment caches (language codes, cache keys, etc.)
This commit is contained in:
commit
e026f4535a
3 changed files with 5 additions and 3 deletions
|
@ -10,8 +10,9 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block about_content %}
|
{% block about_content %}
|
||||||
|
{% get_current_language as LANGUAGE_CODE %}
|
||||||
{# seven day cache #}
|
{# seven day cache #}
|
||||||
{% cache 604800 about_page_superlatives %}
|
{% cache 604800 about_page_superlatives LANGUAGE_CODE %}
|
||||||
|
|
||||||
{% get_book_superlatives as superlatives %}
|
{% get_book_superlatives as superlatives %}
|
||||||
<section class=" pb-4">
|
<section class=" pb-4">
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% get_current_language as LANGUAGE_CODE %}
|
{% get_current_language as LANGUAGE_CODE %}
|
||||||
{% cache 60 * 60 LANGUAGE_CODE %}
|
{# 1 hour cache #}
|
||||||
|
{% cache 3600 landing LANGUAGE_CODE %}
|
||||||
{% get_landing_books as books %}
|
{% get_landing_books as books %}
|
||||||
<section class="tile is-ancestor">
|
<section class="tile is-ancestor">
|
||||||
<div class="tile is-vertical is-6">
|
<div class="tile is-vertical is-6">
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
{% spaceless %}
|
{% spaceless %}
|
||||||
|
|
||||||
{% get_current_language as LANGUAGE_CODE %}
|
{% get_current_language as LANGUAGE_CODE %}
|
||||||
{# 6 month cache #}
|
{# 10 second cache #}
|
||||||
{% cache 10 titleby LANGUAGE_CODE book.id %}
|
{% cache 10 titleby LANGUAGE_CODE book.id %}
|
||||||
|
|
||||||
{% if book.authors.exists %}
|
{% if book.authors.exists %}
|
||||||
|
|
Loading…
Reference in a new issue