Add caching for user basic info

This commit is contained in:
cuom1999 2023-10-10 19:37:36 -05:00
parent 7f854c40dd
commit ed287b6ff3
15 changed files with 110 additions and 33 deletions

View file

@ -54,9 +54,9 @@
</div>
</div>
</div>
{% if user.user.first_name %}
{% if user.first_name %}
<p style="font-size:1.4em; text-align: center;">
{{user.user.first_name}}{% if user.user.last_name %} ({{user.user.last_name}}){% endif %}
{{user.first_name}}{% if user.last_name %} ({{user.last_name}}){% endif %}
</p>
{% endif %}
{% if perms.judge.change_profile %}
@ -70,9 +70,7 @@
{% endif%}
{% if user.about %}
<h4>{{ _('About') }}</h4>
{% cache 86400 'user_about' user.id MATH_ENGINE %}
{{ user.about|markdown(lazy_load=True)|reference|str|safe }}
{% endcache %}
{{ user.about|markdown(lazy_load=True)|reference|str|safe }}
{% else %}
<i>
{% if user.user == request.user %}