/**
* CampCache class constructor.
*
*/
private function __construct($p_cacheEngine)
{
global $Campsite;
if (empty($p_cacheEngine)) {
return;
}
$this->m_cacheEngine = CacheEngine::Factory($p_cacheEngine);
if (is_null($this->m_cacheEngine) || !$this->m_cacheEngine->isSupported()) {
self::$m_enabled = false;
SystemPref::Set('DBCacheEngine', '');
CampSession::singleton()->setData('system_preferences', null, 'default', true);
return;
} else {
self::$m_enabled = true;
}
if (isset($Campsite['CAMP_SECRET'])) {
$this->m_secret = $Campsite['CAMP_SECRET'];
} else {
$this->m_secret = $Campsite['DATABASE_USER']
.$Campsite['DATABASE_NAME']
.$Campsite['DATABASE_SERVER_ADDRESS']
.$Campsite['WWW_DIR'];
}
} // fn __construct