fix(TaskProcessing\Manager): Always use distributed cache and use PHP serialize

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
Marcel Klehr 2025-02-04 13:04:43 +01:00 committed by Andy Scherzinger
parent be1759fcdc
commit befca3e4b9

View file

@ -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();