diff --git a/inc/inc.DBInit.php b/inc/inc.DBInit.php index 583e32288..dafc2d1ea 100644 --- a/inc/inc.DBInit.php +++ b/inc/inc.DBInit.php @@ -54,12 +54,14 @@ if(isset($GLOBALS['SEEDDMS_HOOKS']['initStorage'])) { } } -if($storage) { - $dms = new SeedDMS_Core_DMS($db, $storage); -} else { -// $storage = new SeedDMS_Core_Storage_File($settings->_contentDir.$settings->_contentOffsetDir); -// $dms = new SeedDMS_Core_DMS($db, $storage); - $dms = new SeedDMS_Core_DMS($db, $settings->_contentDir.$settings->_contentOffsetDir); +$dms = new SeedDMS_Core_DMS($db, $storage ? $storage : $settings->_contentDir.$settings->_contentOffsetDir); + +if(extension_loaded('memcached')) { + $memcache = new Memcached('seeddms'); + $memcache->addServers(array( + array('localhost',11211), + )); + $dms->setMemcache($memcache); } if(!$settings->_doNotCheckDBVersion && !$dms->checkVersion()) {