0

There are several SO Q&As about clearing Windows cache for performance testing:

but they are from 14, 11, and 9 years ago respectively, and so may not be applicable to Windows 11. What is the right way(s) to do this in Windows 11?

When I Google "windows 11 memory cache", most of the results are about removing files cached on disk, not in memory. I found one suggestion for flushing RAM cache, which is to run:

%windir%system32rundll32.exe advapi32.dll,ProcessIdleTasks

but Googling that tells me that it doesn't actually flush RAM cache, which is not surprising, given the name of the command.

One interesting suggestion in the SO answers linked above was to use SysInternal's RAMMap. Is that still valid in Windows 11?

Ideally, is there a command I could issue in PowerShell to tell Windows, "Remove file X from RAM"? If not that, what else can I do to flush part or all of the RAM cache?

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
NewSites
  • 1,402
  • 2
  • 11
  • 26

1 Answers1

0

Unfortunately, the only way I've found to do this is to reboot the computer before each run. That's inconvenient, time-consuming, and kludgey. I hope someone will post a better solution.

NewSites
  • 1,402
  • 2
  • 11
  • 26