drop global file cache support, fixes #15621
This commit is contained in:
parent
2344298954
commit
57e8b76f48
|
@ -78,8 +78,6 @@ class Connection extends LDAPUtility {
|
||||||
$memcache = \OC::$server->getMemCacheFactory();
|
$memcache = \OC::$server->getMemCacheFactory();
|
||||||
if($memcache->isAvailable()) {
|
if($memcache->isAvailable()) {
|
||||||
$this->cache = $memcache->create();
|
$this->cache = $memcache->create();
|
||||||
} else {
|
|
||||||
$this->cache = \OC\Cache::getGlobalCache();
|
|
||||||
}
|
}
|
||||||
$this->hasPagedResultSupport =
|
$this->hasPagedResultSupport =
|
||||||
$this->ldap->hasPagedResultSupport();
|
$this->ldap->hasPagedResultSupport();
|
||||||
|
@ -195,7 +193,7 @@ class Connection extends LDAPUtility {
|
||||||
if(!$this->configured) {
|
if(!$this->configured) {
|
||||||
$this->readConfiguration();
|
$this->readConfiguration();
|
||||||
}
|
}
|
||||||
if(!$this->configuration->ldapCacheTTL) {
|
if(is_null($this->cache) || !$this->configuration->ldapCacheTTL) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if(!$this->isCached($key)) {
|
if(!$this->isCached($key)) {
|
||||||
|
@ -215,7 +213,7 @@ class Connection extends LDAPUtility {
|
||||||
if(!$this->configured) {
|
if(!$this->configured) {
|
||||||
$this->readConfiguration();
|
$this->readConfiguration();
|
||||||
}
|
}
|
||||||
if(!$this->configuration->ldapCacheTTL) {
|
if(is_null($this->cache) || !$this->configuration->ldapCacheTTL) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$key = $this->getCacheKey($key);
|
$key = $this->getCacheKey($key);
|
||||||
|
@ -225,12 +223,15 @@ class Connection extends LDAPUtility {
|
||||||
/**
|
/**
|
||||||
* @param string $key
|
* @param string $key
|
||||||
* @param mixed $value
|
* @param mixed $value
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function writeToCache($key, $value) {
|
public function writeToCache($key, $value) {
|
||||||
if(!$this->configured) {
|
if(!$this->configured) {
|
||||||
$this->readConfiguration();
|
$this->readConfiguration();
|
||||||
}
|
}
|
||||||
if(!$this->configuration->ldapCacheTTL
|
if(is_null($this->cache)
|
||||||
|
|| !$this->configuration->ldapCacheTTL
|
||||||
|| !$this->configuration->ldapConfigurationActive) {
|
|| !$this->configuration->ldapConfigurationActive) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -240,8 +241,10 @@ class Connection extends LDAPUtility {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function clearCache() {
|
public function clearCache() {
|
||||||
|
if(!is_null($this->cache)) {
|
||||||
$this->cache->clear($this->getCacheKey(null));
|
$this->cache->clear($this->getCacheKey(null));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Caches the general LDAP configuration.
|
* Caches the general LDAP configuration.
|
||||||
|
|
Loading…
Reference in New Issue