fix: lib/private/TaskProcessing/Manager.php

Co-authored-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
Marcel Klehr 2025-02-04 13:03:59 +01:00 committed by backportbot[bot]
parent ec3660a3c2
commit f9450f2d20

View file

@ -765,8 +765,10 @@ class Manager implements IManager {
}
public function getAvailableTaskTypes(bool $showDisabled = false): array {
if ($this->availableTaskTypes === null && $this->distributedCache->get('available_task_types_v2') !== null) {
$this->availableTaskTypes = unserialize($this->distributedCache->get('available_task_types_v2'));
if ($this->availableTaskTypes === null) {
$cachedValue = $this->distributedCache->get('available_task_types_v2');
if ($cachedValue !== null) {
$this->availableTaskTypes = unserialize($cachedValue);
}
// Either we have no cache or showDisabled is turned on, which we don't want to cache, ever.
if ($this->availableTaskTypes === null || $showDisabled) {