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 GitHub
parent 49a52126ab
commit f127ab10da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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