Use $server->getMemCacheFactory() in ldap connection

This commit is contained in:
Robin Appelman 2014-01-09 13:54:50 +01:00
parent 5a2a0426a6
commit d50c7391d8
2 changed files with 10 additions and 1 deletions

View File

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

View File

@ -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();
}