Beispiel #1
0
 function getOnlineUsersCount()
 {
     $cache = \DataCache::getInstance();
     $count = $cache->get('onlineUsersTotalCount');
     if ($count === null) {
         $count = 0;
         foreach ($this->ccS as $cc) {
             $count += $cc->getOnlineUsersCount();
         }
         $cache->set('onlineUsersTotalCount', $count, 60);
     }
     return $count;
 }
Beispiel #2
0
 function __cleanupService()
 {
     if (isset($_ENV['SOFTHOOKS']['SHUTDOWN'])) {
         foreach ($_ENV['SOFTHOOKS']['SHUTDOWN'] as $hook) {
             executeUserParams($hook["FUNC"], $hook["OBJ"]);
         }
     }
     if (function_exists("runHooks")) {
         runHooks("serviceClose");
     }
     // saveSettings();
     // saveSiteSettings();
     saveSession();
     MetaCache::getInstance()->dumpAllCache();
     DataCache::getInstance()->dumpAllCache();
     Database::closeAll();
 }
Beispiel #3
0
 function _cachePrint($cacheID)
 {
     $cache = DataCache::getInstance();
     return $cache->printCacheFromID($cacheID);
 }