@ -51,7 +51,7 @@ class Connection extends LDAPUtility {
$this->configPrefix = $configPrefix;
$this->configID = $configID;
$this->configuration = new Configuration($configPrefix);
$memcache = new \OC\Memcache\Factory();
$memcache = \OC::$server->getMemCacheFactory();
if($memcache->isAvailable()) {
$this->cache = $memcache->create();
} else {
@ -10,8 +10,17 @@ namespace OCP;
interface CacheFactory{
/**
* Get a memory cache instance
*
* @param string $prefix
* @return $return \OCP\ICache
*/
public function create($prefix = '');
* Check if a memory cache backend is available
* @return bool
public function isAvailable();
}