Skip to content
Snippets Groups Projects
  • Robin Appelman's avatar
    9735b5d6
    Add method to storage backends to get directory content with metadata · 9735b5d6
    Robin Appelman authored
    
    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: default avatarRobin Appelman <robin@icewind.nl>
    9735b5d6
    History
    Add method to storage backends to get directory content with metadata
    Robin Appelman authored
    
    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: default avatarRobin Appelman <robin@icewind.nl>