How to clear Windows disk read cache

windows 7windows-xp

For performance testing I need to clear Windows' disk read cache. I tried googling but I couldn't find anything other than rebooting or other manual stuff. Before I give in and do that, I'd like to know if anyone knows of a way to clear Windows disk read cache. I'm testing on Windows 7, but I'm also interested in Windows XP solutions.

Best Answer

Alternatively fill the cache with data that you know won't be used in the test, then run the test.