set memcached server if php has support for it

This commit is contained in:
Uwe Steinmann 2024-10-11 14:00:06 +02:00
parent 2d6c0eea9e
commit f195525793

View File

@ -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()) {