Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
possible duplicate of How to clear Windows File Cache – Bob Apr 26 '12 at 9:53
There'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 Apr 26 '12 at 9:56
@Bob: I saw it but it was a different question. – somebody Apr 26 '12 at 10:07
It would seem this is not possible after all... – somebody Apr 26 '12 at 10:09
What version of Windows? – David Schwartz Apr 26 '12 at 11:29
up vote 6 down vote accepted

Legendary programmer Mark Russinovich has created a large number of tools that must be in every Windows administrator's and developer's tool kit. One of those tools is RAMMap. On Vista and later (and 2008R2 is later), RAMMap will allow you to free selected memory pools.

The option you want is Empty -> Empty Standby List -- cached pages that are clean and thus eligible to be freed will be in the Standby List. Note that you won't see anything happen in the RAMMap display because it doesn't auto-refresh. You can hit F5 to refresh the display or watch in Task Manager or another tool.

share|improve this answer
That actually worked! I love the tool. Thank you very much. :) – somebody Apr 26 '12 at 13:13
It did work for me on 2008 R2 with a USB HDD. – somebody Apr 26 '12 at 13:14
Is there a way to automatically/regularly empty the standby list? Windows 7 keeps filling it back up annoyingly, and I need to keep it empty, but I don't want to have to visually monitor the standby memory with resource monitor and then manually use RAMMap's empty standby list option. – Kirk Boyer Nov 30 '12 at 8:22
It's painful. The method is: 1) Allocate about as much memory as there is memory on the standby list. 2) Dirty all that memory. 3) Free it. – David Schwartz Nov 30 '12 at 10:27
The option you want is Empty -> Empty Standby List -- cached pages that are clean and thus eligible to be freed will be in the Standby List. Sounds promising, but what does this have to do with the drive-read cache? How would one know that menu applies to disk caches? – Synetech Dec 1 '13 at 0:45

Yes, there's a program that can collapse the file cache automatically every say 5, 10 or any other user defined amount of minutes. The main purpose of the program is reducing memory usage of programs & processes but it also can automatically flush/collapse the file cache. The program is called CLEANMEM and offers the user a very easy way of both automatically & manually collapsing the file cache.

share|improve this answer
If you're going to post an answer, post an answer. – Excellll May 4 '14 at 17:51
OK. The program I am referring to is CLEANMEM. – Willy2 May 4 '14 at 22:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .