{% extends "admin/base_site.html" %}
{% load i18n static %}
{% block title %}{{ cache_name }} | django-cachex{% endblock %}
{% block breadcrumbs %}
{% if info_data %}
{% trans 'Configuration' %}
| {% trans 'Backend' %} |
{{ info_data.backend }} |
| {% trans 'Location' %} |
{{ info_data.location|default:"-" }} |
| {% trans 'Key Prefix' %} |
{{ info_data.key_prefix|default:"-" }} |
| {% trans 'Version' %} |
{{ info_data.version }} |
| {% trans 'Support' %} |
{% if cache_obj.support_level == 'cachex' %}
cachex
{% elif cache_obj.support_level == 'wrapped' %}
wrapped
{% else %}
limited
{% endif %}
|
{% if info_data.server %}
{% trans 'Server' %}
{% if info_data.server.redis_version %}
| {% trans 'Redis/Valkey Version' %} |
{{ info_data.server.redis_version }} |
{% endif %}
{% if info_data.server.os %}
| {% trans 'Operating System' %} |
{{ info_data.server.os }} |
{% endif %}
{% if info_data.server.arch_bits %}
| {% trans 'Architecture' %} |
{{ info_data.server.arch_bits }}-bit |
{% endif %}
{% if info_data.server.tcp_port %}
| {% trans 'TCP Port' %} |
{{ info_data.server.tcp_port }} |
{% endif %}
{% if info_data.server.uptime_in_days is not None %}
| {% trans 'Uptime' %} |
{{ info_data.server.uptime_in_days }} {% trans 'days' %} ({{ info_data.server.uptime_in_seconds }} {% trans 'seconds' %}) |
{% endif %}
{% if info_data.server.process_id %}
| {% trans 'Process ID' %} |
{{ info_data.server.process_id }} |
{% endif %}
{% endif %}
{% if info_data.memory %}
{% trans 'Memory' %}
{% if info_data.memory.used_memory_human %}
| {% trans 'Used Memory' %} |
{{ info_data.memory.used_memory_human }} ({{ info_data.memory.used_memory }} bytes) |
{% endif %}
{% if info_data.memory.used_memory_peak_human %}
| {% trans 'Peak Memory' %} |
{{ info_data.memory.used_memory_peak_human }} ({{ info_data.memory.used_memory_peak }} bytes) |
{% endif %}
{% if info_data.memory.maxmemory %}
| {% trans 'Max Memory' %} |
{{ info_data.memory.maxmemory_human|default:info_data.memory.maxmemory }} |
{% endif %}
{% if info_data.memory.maxmemory_policy %}
| {% trans 'Eviction Policy' %} |
{{ info_data.memory.maxmemory_policy }} |
{% endif %}
{% endif %}
{% if info_data.clients %}
{% trans 'Clients' %}
{% if info_data.clients.connected_clients is not None %}
| {% trans 'Connected Clients' %} |
{{ info_data.clients.connected_clients }} |
{% endif %}
{% if info_data.clients.blocked_clients is not None %}
| {% trans 'Blocked Clients' %} |
{{ info_data.clients.blocked_clients }} |
{% endif %}
{% endif %}
{% if info_data.stats %}
{% trans 'Statistics' %}
{% if info_data.stats.total_connections_received is not None %}
| {% trans 'Total Connections' %} |
{{ info_data.stats.total_connections_received }} |
{% endif %}
{% if info_data.stats.total_commands_processed is not None %}
| {% trans 'Total Commands' %} |
{{ info_data.stats.total_commands_processed }} |
{% endif %}
{% if info_data.stats.instantaneous_ops_per_sec is not None %}
| {% trans 'Ops/sec' %} |
{{ info_data.stats.instantaneous_ops_per_sec }} |
{% endif %}
{% if info_data.stats.keyspace_hits is not None %}
| {% trans 'Keyspace Hits' %} |
{{ info_data.stats.keyspace_hits }} |
{% endif %}
{% if info_data.stats.keyspace_misses is not None %}
| {% trans 'Keyspace Misses' %} |
{{ info_data.stats.keyspace_misses }} |
{% endif %}
{% if info_data.stats.expired_keys is not None %}
| {% trans 'Expired Keys' %} |
{{ info_data.stats.expired_keys }} |
{% endif %}
{% if info_data.stats.evicted_keys is not None %}
| {% trans 'Evicted Keys' %} |
{{ info_data.stats.evicted_keys }} |
{% endif %}
{% endif %}
{% if info_data.keyspace %}
{% trans 'Keyspace' %}
{% for db_name, db_stats in info_data.keyspace.items %}
{{ db_name }}
{% if db_stats.keys is not None %}
{% trans 'Keys' %}
{{ db_stats.keys }}
{% endif %}
{% if db_stats.expires is not None %}
{% trans 'Expires' %}
{{ db_stats.expires }}
{% endif %}
{% if db_stats.avg_ttl is not None %}
{% trans 'Avg TTL' %}
{{ db_stats.avg_ttl }}ms
{% endif %}
{% endfor %}
{% endif %}
{% if raw_info_json %}
{% endif %}
{% endif %}
{% if slowlog_data %}
{% trans 'Slow Log' %}
{% if slowlog_data.error %}
{% else %}
{% if slowlog_data.entries %}
| {% trans 'ID' %} |
{% trans 'Time' %} |
{% trans 'Duration' %} |
{% trans 'Command' %} |
{% trans 'Client' %} |
{% for entry in slowlog_data.entries %}
| {{ entry.id }} |
{% if entry.timestamp %}
{{ entry.timestamp|date:"Y-m-d H:i:s" }}
{% else %}
-
{% endif %}
|
{% if entry.duration_us >= 1000000 %}
{{ entry.duration_us|floatformat:0 }} µs ({{ entry.duration_us|divisibleby:1000000 }}s)
{% elif entry.duration_us >= 1000 %}
{{ entry.duration_us }} µs ({{ entry.duration_us|floatformat:0 }}ms)
{% else %}
{{ entry.duration_us }} µs
{% endif %}
|
{% for arg in entry.command %}{{ arg }} {% endfor %}
|
{% if entry.client %}{{ entry.client }}{% endif %}
{% if entry.client_name %} {{ entry.client_name }}{% endif %}
|
{% endfor %}
{% else %}
{% trans 'No slow queries recorded.' %}
{% endif %}
{% endif %}
{% endif %}
{% endblock %}