public function __construct(&$config, &$db_assertor) { parent::__construct($config, $db_assertor); if (defined('SKIP_DEFAULTDATASTORE')) { $this->cacheableitems = array('options', 'bitfields'); } //this define is only used in this file so move it here. $vb5_config =& vB::getConfig(); if (!empty($vb5_config['Misc']['datastorepath'])) { $this->datastoreLocation = $vb5_config['Misc']['datastorepath']; return; } //It's cool if the user can set this in fileSystem cache and let this pick it up. if (!empty($vb5_config['Cache']['fileCachePath']) and file_exists($vb5_config['Cache']['fileCachePath']) and is_dir($vb5_config['Cache']['fileCachePath'])) { $path = $vb5_config['Cache']['fileCachePath'] . '/datastore'; if (!file_exists($path)) { mkdir($path); file_put_contents($path . '/index.html', ''); } if (is_dir($path)) { if (!file_exists($path . '/datastore_cache.php') and file_exists(DIR . '/includes/datastore/datastore_cache.php')) { copy(DIR . '/includes/datastore/datastore_cache.php', $path . '/datastore_cache.php'); } if (!file_exists($path . 'datastore_cache.php')) { $this->datastoreLocation = $path; } return; } } $this->datastoreLocation = DIR . '/includes/datastore'; }
public function __construct(&$config, &$db_assertor) { parent::__construct($config, $db_assertor); if (!empty($config['Cache']['memcacheprefix'])) { $this->prefix =& $config['Cache']['memcacheprefix']; } $this->memcache = vB_Memcache::instance(); }