Skip to content

Commit bbedc83

Browse files
committed
Revert "Do not cache file ids in FileSystemTags"
This reverts commit d5e3306.
1 parent d5e3306 commit bbedc83

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

apps/workflowengine/lib/Check/FileSystemTags.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
77
* @author Joas Schilling <coding@schilljs.com>
88
* @author Julius Härtl <jus@bitgrid.net>
9-
* @author Richard Steinmetz <richard@steinmetz.cloud>
109
*
1110
* @license GNU AGPL version 3 or any later version
1211
*
@@ -40,6 +39,9 @@
4039
class FileSystemTags implements ICheck, IFileCheck {
4140
use TFileCheck;
4241

42+
/** @var array */
43+
protected $fileIds;
44+
4345
/** @var array */
4446
protected $fileSystemTags;
4547

@@ -129,6 +131,11 @@ protected function getSystemTags() {
129131
* @return int[]
130132
*/
131133
protected function getFileIds(ICache $cache, $path, $isExternalStorage) {
134+
$cacheId = $cache->getNumericStorageId();
135+
if (isset($this->fileIds[$cacheId][$path])) {
136+
return $this->fileIds[$cacheId][$path];
137+
}
138+
132139
$parentIds = [];
133140
if ($path !== $this->dirname($path)) {
134141
$parentIds = $this->getFileIds($cache, $this->dirname($path), $isExternalStorage);
@@ -141,6 +148,8 @@ protected function getFileIds(ICache $cache, $path, $isExternalStorage) {
141148
$parentIds[] = $cache->getId($path);
142149
}
143150

151+
$this->fileIds[$cacheId][$path] = $parentIds;
152+
144153
return $parentIds;
145154
}
146155

0 commit comments

Comments
 (0)