clear the cached storage info after it was flagged unavailable
so that follow up operations against this one do not try to reauth and cause lock outs Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
78c7e6f2c5
commit
ef188de297
|
@ -173,6 +173,7 @@ class Storage {
|
|||
$sql = 'UPDATE `*PREFIX*storages` SET `available` = ?, `last_checked` = ? WHERE `id` = ?';
|
||||
$available = $isAvailable ? 1 : 0;
|
||||
\OC_DB::executeAudited($sql, [$available, time() + $delay, $this->storageId]);
|
||||
self::getGlobalCache()->clearStorageInfo($this->storageId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -85,4 +85,10 @@ class StorageGlobal {
|
|||
public function clearCache() {
|
||||
$this->cache = [];
|
||||
}
|
||||
|
||||
public function clearStorageInfo(string $storageId) {
|
||||
if(isset($this->cache[$storageId])) {
|
||||
unset($this->cache[$storageId]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue