diff --git a/e107_handlers/e107_class.php b/e107_handlers/e107_class.php index 8ce423c4bd..ae786fdd18 100644 --- a/e107_handlers/e107_class.php +++ b/e107_handlers/e107_class.php @@ -48,6 +48,11 @@ class e107 public $file_path; public $site_path; public $relative_base_path; + + public $ecache; + + + // public $_ip_cache; // public $_host_name_cache; diff --git a/e107_handlers/e_ranks_class.php b/e107_handlers/e_ranks_class.php index 6c842b4c34..9bbfa74202 100644 --- a/e107_handlers/e_ranks_class.php +++ b/e107_handlers/e_ranks_class.php @@ -30,10 +30,10 @@ public function __construct($force = false) $this->imageFolder = is_dir(THEME.'images/ranks') ? THEME_ABS.'images/ranks/' : e_IMAGE_ABS.'ranks/'; - $e107 = e107::getInstance(); + $ecache = e107::getCache(); $sql = e107::getDb(); //Check to see if we can get it from cache - if($force == false && ($ranks = $e107->ecache->retrieve_sys('nomd5_user_ranks'))) + if($force == false && ($ranks = $ecache->retrieve_sys('nomd5_user_ranks'))) { $this->ranks = e107::unserialize($ranks); } @@ -62,7 +62,7 @@ public function __construct($force = false) } } } - $e107->ecache->set_sys('nomd5_user_ranks', e107::serialize($this->ranks, false)); + $ecache->set_sys('nomd5_user_ranks', e107::serialize($this->ranks, false)); } // defaults diff --git a/e107_handlers/userclass_class.php b/e107_handlers/userclass_class.php index 5638d6656d..4dbc25bdb9 100644 --- a/e107_handlers/userclass_class.php +++ b/e107_handlers/userclass_class.php @@ -151,14 +151,14 @@ public function readTree($force = FALSE) { if (isset($this->class_tree) && count($this->class_tree) && !$force) return; - $e107 = e107::getInstance(); + $ecache = e107::getCache(); $this->class_tree = array(); $this->class_parents = array(); - if ($temp = $e107->ecache->retrieve_sys(UC_CACHE_TAG)) + if ($temp = $ecache->retrieve_sys(UC_CACHE_TAG)) { $this->class_tree = e107::unserialize($temp); unset($temp); @@ -202,7 +202,7 @@ public function readTree($force = FALSE) } $userCache = e107::serialize($this->class_tree, FALSE); - $e107->ecache->set_sys(UC_CACHE_TAG,$userCache); + $ecache->set_sys(UC_CACHE_TAG,$userCache); unset($userCache); } diff --git a/e107_plugins/forum/e_admin_events.php b/e107_plugins/forum/e_admin_events.php index eff79423fb..0c8cf8915f 100755 --- a/e107_plugins/forum/e_admin_events.php +++ b/e107_plugins/forum/e_admin_events.php @@ -28,7 +28,6 @@ function plugin_forum_admin_events($type, $parms) //Called if classtree cache is cleared. Meaning we'll need to rebuild moderator cache function plugin_forum_admin_events_clear_moderators() { - $e107 = e107::getInstance(); - $e107->ecache->clear_sys('nomd5_forum_moderators'); + e107::getCache()->clear_sys('nomd5_forum_moderators'); }