improved cache debugging in debug view to catch more cases and give user better feedback about failed services

This commit is contained in:
HB9HIL
2026-02-20 16:56:27 +01:00
parent c85fb353e3
commit 90131b2645
2 changed files with 59 additions and 12 deletions

View File

@@ -315,6 +315,45 @@
<?php } ?>
</td>
</tr>
<?php if ($cache_adapter == 'apcu' || $cache_backup == 'apcu') { ?>
<tr>
<td>php-apcu</td>
<td>
<?php if (in_array('apcu', get_loaded_extensions())) { ?>
<span class="badge text-bg-success"><?= __("Installed"); ?></span>
<?php } else { ?>
<span class="badge text-bg-danger"><?= __("Not Installed"); ?></span>
<?php } ?>
</td>
</tr>
<?php } ?>
<?php if ($cache_adapter == 'redis' || $cache_backup == 'redis') { ?>
<tr>
<td>php-redis</td>
<td>
<?php if (in_array('redis', get_loaded_extensions())) { ?>
<span class="badge text-bg-success"><?= __("Installed"); ?></span>
<?php } else { ?>
<span class="badge text-bg-danger"><?= __("Not Installed"); ?></span>
<?php } ?>
</td>
</tr>
<?php } ?>
<?php if ($cache_adapter == 'memcached' || $cache_backup == 'memcached') { ?>
<tr>
<td>php-memcached</td>
<td>
<?php if (in_array('memcached', get_loaded_extensions())) { ?>
<span class="badge text-bg-success"><?= __("Installed"); ?></span>
<?php } else { ?>
<span class="badge text-bg-danger"><?= __("Not Installed"); ?></span>
<?php } ?>
</td>
</tr>
<?php } ?>
</table>
</div>
<div class="col">
@@ -433,6 +472,8 @@
<span class="badge text-bg-primary"><?php echo $cache_backup; ?></span>
<?php if ($cache_backup == $active_adapter) { ?>
<span class="badge text-bg-success"><?= __("Active"); ?></span>
<?php } else if ($active_adapter == 'dummy') { ?>
<span class="badge text-bg-danger"><?= __("Failed"); ?></span>
<?php } ?>
</td>
</tr>
@@ -445,15 +486,6 @@
<td><code><?php echo $cache_key_prefix; ?></code></td>
</tr>
</table>
<?php if ($using_backup) { ?>
<div class="alert alert-danger mt-2 mb-0" role="alert">
<?= __("Cache is currently using the backup adapter because the primary is unavailable."); ?>
</div>
<?php } else { ?>
<div class="alert alert-success mt-2 mb-0" role="alert">
<?= __("Cache is working properly. Everything okay!"); ?>
</div>
<?php } ?>
</div>
<div class="col-md-6">
<p><u><?= __("Cache Details"); ?></u></p>
@@ -472,6 +504,21 @@
</tr>
</table>
</div>
<div class="ms-2 me-2">
<?php if (!$using_backup) { ?>
<div class="alert alert-success mt-2 mb-0" role="alert">
<?= __("Cache is working properly. Everything okay!"); ?>
</div>
<?php } else if ($active_adapter !== 'dummy') { ?>
<div class="alert alert-danger mt-2 mb-0" role="alert">
<?= __("Cache is currently using the backup adapter because the primary is unavailable. Check your file permissions, php-extensions and/or if you are using redis/memcached your network connection to the services."); ?>
</div>
<?php } else { ?>
<div class="alert alert-danger mt-2 mb-0" role="alert">
<?= __("Cache does not work! Currently the system is using a %s adapter. Check your file permissions, php-extensions and/or if you are using redis/memcached your network connection to the services. You can continue using Wavelog, but no values will be cached (which is bad).", "'dummy'"); ?>
</div>
<?php } ?>
</div>
</div>
<div class="border-top pt-3 mt-3">
<div class="row">