From 2622e27cffd39a955400b988560020c5372778d2 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/private/TaskProcessing/Manager.php b/lib/private/TaskProcessing/Manager.php index c89080c862745..f6776b4860af3 100644 --- a/lib/private/TaskProcessing/Manager.php +++ b/lib/private/TaskProcessing/Manager.php @@ -740,7 +740,10 @@ public function getPreferredProvider(string $taskTypeId) { 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();