pages/online: add cache, resulting in 20x performance boost

(for an example server with 2k players)
This commit is contained in:
slawkens
2025-07-31 13:28:46 +02:00
parent 0efe47ce71
commit c836308601
3 changed files with 98 additions and 80 deletions

View File

@@ -1,3 +1,9 @@
{% set onlineTTL = setting('core.online_cache_ttl') %}
{% if onlineTTL > 0 and cache.enabled() %}
<small>*Note: Online List is updated every {{ onlineTTL > 1 ? ' ' ~ onlineTTL : '' }} minute{{ onlineTTL > 1 ? 's' : '' }}.</small>
<br/>
{% endif %}
{# vocation statistics #}
{% if setting('core.online_vocations') %}
<br/>