/** * Constructor protected to enforce singleton use. * @see instance() */ protected function __construct($cachetype) { $vb5_config =& vB::getConfig(); if (self::$disableCache and $cachetype != self::CACHE_FAST) { $this->noCache = true; } if (!empty($vb5_config['Misc']['cacheLogging'])) { //we need to have the cacheLog table. vB::getDbAssertor()->assertQuery('vBInstall:createCacheLogTable', array()); self::$cacheLogging = true; } // we are using the same prefix as for the datastore $this->prefix =& $vb5_config['Datastore']['prefix']; $this->cachetype = $cachetype; //during install or in cli we don't have a session. try { $request = vB::getRequest(); if (!empty($request) and is_object($request)) { $this->timeNow = $request->getTimeNow(); } else { $this->timeNow = time(); } } catch (exception $e) { $this->timeNow = time(); } }