Is there a way to reset Windows file cache?

Welcome to Programming Tutorial official website. Today - we are going to cover how to solve / find the solution of this error Is there a way to reset Windows file cache? on this date .

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?

Answer

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.