diff options
author | Robin Appelman <robin@icewind.nl> | 2020-03-27 17:47:20 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2020-04-20 15:45:04 +0200 |
commit | 9735b5d61f8577fea01810b5de3e1dab2ec6c77e (patch) | |
tree | c4e9d71dae03a4d49eec41fe09ec07243e355e83 /lib/private/Files/ObjectStore | |
parent | b1a90da34730a6c119df4cb5b992177d8dbedeca (diff) | |
download | nextcloud-server-9735b5d61f8577fea01810b5de3e1dab2ec6c77e.tar.gz nextcloud-server-9735b5d61f8577fea01810b5de3e1dab2ec6c77e.zip |
Add method to storage backends to get directory content with metadata
Currently you need to use `opendir` and then call `getMetadata` for
every file, which adds overhead because most storage backends already
get the metadata when doing the `opendir`.
While storagebackends can (and do) use caching to relief this problem,
this adds cache invalidation dificulties and only a limited number of
items are generally cached (to prevent memory usage exploding when
scanning large storages)
With this new methods storage backends can use the child metadata they
got from listing the folder to return metadata without having to keep
seperate caches.
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Files/ObjectStore')
-rw-r--r-- | lib/private/Files/ObjectStore/NoopScanner.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/ObjectStore/NoopScanner.php b/lib/private/Files/ObjectStore/NoopScanner.php index 57a94aba294..25b52416efd 100644 --- a/lib/private/Files/ObjectStore/NoopScanner.php +++ b/lib/private/Files/ObjectStore/NoopScanner.php @@ -44,7 +44,7 @@ class NoopScanner extends Scanner { * @param array|null $cacheData existing data in the cache for the file to be scanned * @return array an array of metadata of the scanned file */ - public function scanFile($file, $reuseExisting = 0, $parentId = -1, $cacheData = null, $lock = true) { + public function scanFile($file, $reuseExisting = 0, $parentId = -1, $cacheData = null, $lock = true, $data = null) { return []; } |