mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
Clean up Memcached and Redis cache handlers
This commit is contained in:
parent
f3d3122787
commit
7955aaddd0
3 changed files with 79 additions and 104 deletions
6
classes/cache/CacheHandler.class.php
vendored
6
classes/cache/CacheHandler.class.php
vendored
|
|
@ -59,11 +59,11 @@ class CacheHandler extends Handler
|
|||
// Allow using custom cache info for backward compatibility.
|
||||
if (is_object($info) && $info->use_object_cache)
|
||||
{
|
||||
$cache_config = $info->use_object_cache;
|
||||
$cache_config = $cache_config_array = $info->use_object_cache;
|
||||
}
|
||||
else
|
||||
{
|
||||
$cache_config = config('cache');
|
||||
$cache_config = $cache_config_array = config('cache');
|
||||
if (is_array($cache_config) && count($cache_config))
|
||||
{
|
||||
$cache_config = array_first($cache_config);
|
||||
|
|
@ -87,7 +87,7 @@ class CacheHandler extends Handler
|
|||
// Create an instance of cache backend.
|
||||
$class = 'Cache' . ucfirst($type);
|
||||
include_once sprintf('%sclasses/cache/%s.class.php', _XE_PATH_, $class);
|
||||
$this->handler = $class::getInstance($cache_config);
|
||||
$this->handler = $class::getInstance($cache_config_array);
|
||||
|
||||
// Initialize key group versions.
|
||||
$this->keyGroupVersions = $this->handler->get('key_group_versions', 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue