diff --git a/application/controllers/Debug.php b/application/controllers/Debug.php index d52a15ede..18997390a 100644 --- a/application/controllers/Debug.php +++ b/application/controllers/Debug.php @@ -106,8 +106,17 @@ class Debug extends CI_Controller } // Cache Info - $data['cache_info'] = $this->debug_model->get_cache_info(); - + $cache_info = $this->debug_model->get_cache_info(); + $data['cache_available_adapters'] = $cache_info['adapters']; + $data['cache_path'] = $cache_info['config']['cache_path'] ?: 'application/cache'; + $data['cache_adapter'] = ucfirst($cache_info['config']['cache_adapter'] ?? 'file'); + $data['cache_backup'] = ucfirst($cache_info['config']['cache_backup'] ?? 'file'); + $data['cache_key_prefix'] = $cache_info['config']['cache_key_prefix'] ?: __("(empty)"); + $data['active_adapter'] = ucfirst($cache_info['active']['adapter'] ?? ($cache_info['config']['cache_adapter'] ?? 'file')); + $data['using_backup'] = !empty($cache_info['active']['using_backup']); + $data['details_cache_size'] = $cache_info['details']['size'] ?? '0 B'; + $data['details_cache_keys_count'] = $cache_info['details']['keys_count'] ?? 0; + $data['dxcc_update'] = $this->cron_model->cron('update_dxcc')->row(); $data['dok_update'] = $this->cron_model->cron('update_update_dok')->row(); $data['lotw_user_update'] = $this->cron_model->cron('update_lotw_users')->row(); diff --git a/application/models/Debug_model.php b/application/models/Debug_model.php index cd9c339ab..15a09236f 100644 --- a/application/models/Debug_model.php +++ b/application/models/Debug_model.php @@ -229,6 +229,10 @@ class Debug_model extends CI_Model 'key_prefix' => $cache_key_prefix ]); + $active_adapter = method_exists($this->cache, 'get_loaded_driver') ? $this->cache->get_loaded_driver() : $cache_adapter; + $response['active']['adapter'] = $active_adapter; + $response['active']['using_backup'] = ($active_adapter !== $cache_adapter); + // Get cache details $cache_size = $this->get_cache_size(); $cache_keys_count = $this->get_cache_keys_count(); diff --git a/application/views/debug/index.php b/application/views/debug/index.php index 14030eaf2..95177f5bd 100644 --- a/application/views/debug/index.php +++ b/application/views/debug/index.php @@ -408,40 +408,53 @@
= __("Current Configuration"); ?>
| = __("Adapter"); ?> | += _pgettext("Cache Adapter","Primary adapter"); ?> | - + + + = __("Active"); ?> + + = __("Failed"); ?> + | |
| = __("Backup"); ?> | += _pgettext("Cache Backup Adapter (Fallback)","Backup adapter"); ?> | - + + + = __("Active"); ?> + | |
| = __("Path"); ?> | - |
+ = _pgettext("Cache Path","Path for files adapter"); ?> | + |
| = __("Key Prefix"); ?> | - |
+ = _pgettext("Cache Key Prefix","Key Prefix"); ?> | + |
= __("Cache Details"); ?>
| = __("Total Size"); ?> | += _pgettext("Cache Details","Total Size"); ?> | - + |
| = __("Number of Keys"); ?> | += _pgettext("Cache Key","Number of Keys"); ?> | - + |
= __("Available Adapters"); ?>