9
3
When an application reads a file from a media, the first time the timing is significant as the file is indeed read, sometimes several minutes. But with subsequent reads, it only takes a few seconds and there is no disk activity. I assume it's because Windows keeps the read file in memory.
Is there a way to tell Windows to drop the cache for a file and force it to read it again from the media?
Obvious workarounds is to disconnect ad reconnect a drive (if it's external) or restart Windows. Are there any simpler options?
possible duplicate of How to clear Windows File Cache
– Bob – 2012-04-26T09:53:48.633There's also the StackOverflow related question: Clear file cache to repeat performance testing, and from a programming perspective there's a MSDN article with some Windows API flags: File Caching
– Bob – 2012-04-26T09:56:20.410@Bob: I saw it but it was a different question. – somebody – 2012-04-26T10:07:16.387
It would seem this is not possible after all... – somebody – 2012-04-26T10:09:39.813
What version of Windows? – David Schwartz – 2012-04-26T11:29:15.680
Windows Server 2008 R2. – somebody – 2012-04-26T11:43:49.270