From befca3e4b92071584f546bd0d04da45afa90bee9 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Tue, 4 Feb 2025 13:04:43 +0100 Subject: [PATCH] fix(TaskProcessing\Manager): Always use distributed cache and use PHP serialize Signed-off-by: Marcel Klehr --- lib/private/TaskProcessing/Manager.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/private/TaskProcessing/Manager.php b/lib/private/TaskProcessing/Manager.php index c89080c8627..0e1c830ead7 100644 --- a/lib/private/TaskProcessing/Manager.php +++ b/lib/private/TaskProcessing/Manager.php @@ -739,8 +739,10 @@ class Manager implements IManager { public function getAvailableTaskTypes(): array { if ($this->availableTaskTypes === null) { - // We use local cache only because distributed cache uses JSOn stringify which would botch our ShapeDescriptor objects - $this->availableTaskTypes = $this->cache->get('available_task_types'); + $cachedValue = $this->distributedCache->get('available_task_types_v2'); + if ($cachedValue !== null) { + $this->availableTaskTypes = unserialize($cachedValue); + } } if ($this->availableTaskTypes === null) { $taskTypes = $this->_getTaskTypes();