Merge pull request #2550 from chdorner/fix/cache-languages

Fix fragment caches (language codes, cache keys, etc.)
This commit is contained in:
Mouse Reeve 2022-12-30 07:33:15 -08:00 committed by GitHub
commit e026f4535a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View file

@ -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">

View file

@ -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">

View file

@ -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 %}