diff options
author | Marcel Klehr <mklehr@gmx.net> | 2025-02-04 13:04:43 +0100 |
---|---|---|
committer | Andy Scherzinger <info@andy-scherzinger.de> | 2025-02-13 16:44:10 +0100 |
commit | befca3e4b92071584f546bd0d04da45afa90bee9 (patch) | |
tree | fd4abfaa174c985c611206a6afe2b84e0e82f7c0 | |
parent | be1759fcdc451fd4c9420c935542a135d7472dfc (diff) | |
download | nextcloud-server-backport/50640/stable30.tar.gz nextcloud-server-backport/50640/stable30.zip |
fix(TaskProcessing\Manager): Always use distributed cache and use PHP serializebackport/50640/stable30
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
-rw-r--r-- | lib/private/TaskProcessing/Manager.php | 6 |
1 files 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(); |