Skip to content

Commit ccb3ff0

Browse files
marcelklehrAndyScherzinger
authored andcommitted
fix(TaskProcessing\Manager): Always use distributed cache and use PHP serialize
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
1 parent 2ee8688 commit ccb3ff0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/private/TaskProcessing/Manager.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -739,8 +739,10 @@ public function getPreferredProvider(string $taskTypeId) {
739739

740740
public function getAvailableTaskTypes(): array {
741741
if ($this->availableTaskTypes === null) {
742-
// We use local cache only because distributed cache uses JSOn stringify which would botch our ShapeDescriptor objects
743-
$this->availableTaskTypes = $this->cache->get('available_task_types');
742+
$cachedValue = $this->distributedCache->get('available_task_types_v2');
743+
if ($cachedValue !== null) {
744+
$this->availableTaskTypes = unserialize($cachedValue);
745+
}
744746
}
745747
if ($this->availableTaskTypes === null) {
746748
$taskTypes = $this->_getTaskTypes();

0 commit comments

Comments
 (0)