Esempio n. 1
0
 public function __construct($sTable)
 {
     $this->sTable = $sTable;
     $db = Neuron_DB_Database::getInstance();
     $this->dbObj = $db->getConnection();
     //$this->dbObj = new Mysqli (DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_DATABASE);
     $this->objMemcache = Neuron_Core_Memcache::getInstance();
     $server = Neuron_GameServer::getServer();
     $this->iServer = $server->getServerId();
 }
 private function getTutorialPageCount()
 {
     $cache = Neuron_Core_Memcache::getInstance();
     if (!($count = $cache->getCache('tutorial_count_cache'))) {
         $i = 1;
         while ($this->hasContent($this->prefix . '/Tutorial' . ($i + 1))) {
             $i++;
         }
         $count = $i;
         $cache->setCache('tutorial_count_cache', $count);
     }
     return $count;
 }
<?php

$cache = Neuron_Core_Memcache::getInstance();
echo '<pre>' . $cache . '</pre>';
 /**
  * C-c-c-construct!
  */
 protected function __construct()
 {
     $this->objCache = Neuron_Core_Memcache::getInstance();
     $this->sPrefix = DB_DATABASE . '_chat_';
 }
 public static function clearCache($clearMapCache = true)
 {
     self::emptyDir(CACHE_DIR);
     /*
     self::emptyDir ('cache/minimap');
     self::emptyDir ('cache/mediawiki');
     self::emptyDir ('cache/hugemap');
     self::emptyDir ('cache/heightmap');
     */
     //self::emptyDir (CACHE_DIR . 'openid');
     if ($clearMapCache) {
         $db = Neuron_Core_Database::__getInstance();
         //$db->customQuery (" TRUNCATE TABLE `z_cache_tiles`  ");
         $server = self::__getInstance();
         $server->setData('prepRadD', 0);
     }
     $cache = Neuron_Core_Memcache::getInstance();
     $cache->flush();
 }
 public function __construct()
 {
     $this->sCacheKey = md5(DB_DATABASE . '_last_chat_message');
     $this->objCache = Neuron_Core_Memcache::getInstance();
     parent::__construct();
 }
Esempio n. 7
0
 private function __construct()
 {
     $this->objMemcache = Neuron_Core_Memcache::getInstance();
     $server = Neuron_GameServer::getServer();
     $this->iServer = $server->getServerId();
 }