aboutsummaryrefslogtreecommitdiffstats
path: root/apps/workflowengine
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2022-05-13 08:27:28 +0200
committerGitHub <noreply@github.com>2022-05-13 08:27:28 +0200
commitfe33e9c08cbbc80738660d2d78838f04d24e0e2e (patch)
treefeab7d407620addc9a7eb50f8bd5789e08434074 /apps/workflowengine
parent48bb547e8a24dab04bcc18df9bf5f50aa6b7462a (diff)
parentec6b83cc1891214c7fa3a236626807b4335f9a2f (diff)
downloadnextcloud-server-fe33e9c08cbbc80738660d2d78838f04d24e0e2e.tar.gz
nextcloud-server-fe33e9c08cbbc80738660d2d78838f04d24e0e2e.zip
Merge pull request #32250 from nextcloud/cleanup/cappedmemorycache
Diffstat (limited to 'apps/workflowengine')
-rw-r--r--apps/workflowengine/lib/Manager.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/workflowengine/lib/Manager.php b/apps/workflowengine/lib/Manager.php
index 34dbf507b91..f6c3e3086c2 100644
--- a/apps/workflowengine/lib/Manager.php
+++ b/apps/workflowengine/lib/Manager.php
@@ -109,8 +109,8 @@ class Manager implements IManager {
/** @var ILogger */
protected $logger;
- /** @var CappedMemoryCache */
- protected $operationsByScope = [];
+ /** @var CappedMemoryCache<int[]> */
+ protected CappedMemoryCache $operationsByScope;
/** @var IUserSession */
protected $session;
@@ -350,10 +350,11 @@ class Manager implements IManager {
$qb->setParameters(['scope' => $scopeContext->getScope(), 'scopeId' => $scopeContext->getScopeId()]);
$result = $qb->execute();
- $this->operationsByScope[$scopeContext->getHash()] = [];
+ $operations = [];
while (($opId = $result->fetchOne()) !== false) {
- $this->operationsByScope[$scopeContext->getHash()][] = (int)$opId;
+ $operations[] = (int)$opId;
}
+ $this->operationsByScope[$scopeContext->getHash()] = $operations;
$result->closeCursor();
return in_array($id, $this->operationsByScope[$scopeContext->getHash()], true);