Take the 2-minute tour ×

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?

share|improve this question
add comment

1 Answer

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

share|improve this answer
add comment

Your Answer


