Skip to content

Commit

Permalink
fix(TaskProcessing\Manager): Always use distributed cache and use PHP…
Browse files Browse the repository at this point in the history
… serialize

Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr authored and AndyScherzinger committed Feb 13, 2025
1 parent 2ee8688 commit ccb3ff0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/private/TaskProcessing/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -739,8 +739,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();
Expand Down

0 comments on commit ccb3ff0

Please sign in to comment.