Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does NetBIOS do any caching?

If I read a file from a UNC network share does Windows cache parts of that file?

For example: If I read the whole file byte for byte, will each read call result in a request over the network, or does Windows read larger blocks internally, and serve subsequent request from memory?

like image 630
Maestro Avatar asked Nov 13 '22 00:11

Maestro


1 Answers

If I understand it correctly contents of the file may be cached.

To make sure that all reads will be done against the actual file and not from any system buffer or disc cache one could use the FILE_FLAG_NO_BUFFERING in a call to CreateFile.

You can also disable caching for a shared resource using net share <sharename> /cache:none

like image 170
Cyclonecode Avatar answered Dec 19 '22 12:12

Cyclonecode