mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
refactored the cache loader
- adjusted formatting to make it easier to read - added the key prefix from config - made everything failsafe since users don't have that configured by default
This commit is contained in:
@@ -1255,7 +1255,11 @@ class API extends CI_Controller {
|
||||
}
|
||||
|
||||
// Load cache driver
|
||||
$this->load->driver('cache', ['adapter' => $this->config->item('cache_adapter'), 'backup' => $this->config->item('cache_backup')]);
|
||||
$this->load->driver('cache', [
|
||||
'adapter' => $this->config->item('cache_adapter') ?? 'file',
|
||||
'backup' => $this->config->item('cache_backup') ?? 'file',
|
||||
'key_prefix' => $this->config->item('cache_key_prefix') ?? ''
|
||||
]);
|
||||
|
||||
// Create cache key
|
||||
$cache_key = "wp_stats_{$station_id}";
|
||||
|
||||
Reference in New Issue
Block a user