Commands like ls fetch list of files using readdir() call, then attributes of every individual file are queried with getattr(). Making database query on each getattr can be an expensive operation, especially in case of remote db server. So we need to implement some kind of short-living caching. One of the options is to use opendir/releasedir as a hints of cache expiration.
Commands like
lsfetch list of files usingreaddir()call, then attributes of every individual file are queried withgetattr(). Making database query on each getattr can be an expensive operation, especially in case of remote db server. So we need to implement some kind of short-living caching. One of the options is to useopendir/releasediras a hints of cache expiration.