Use $server->getMemCacheFactory() in ldap connection

remotes/origin/ldap_group_count
Robin Appelman 11 years ago
parent 5a2a0426a6
commit d50c7391d8
  1. 2
      apps/user_ldap/lib/connection.php
  2. 9
      lib/public/cachefactory.php

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

Loading…
Cancel
Save