mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 09:13:19 -04:00
fix(TaskProcessing\Manager): Always use distributed cache and use PHP serialize
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
parent
be1759fcdc
commit
befca3e4b9
1 changed files with 4 additions and 2 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue