# CacheSet - Sysinternals | Microsoft Learn

CacheSet v1.02 — Summary By Mark Russinovich — Published: December 16, 2021

What it is

* CacheSet is a small utility for Windows that lets you view and manipulate the system file cache working-set parameters (minimum and maximum sizes) and reset or clear the cache’s working set.
* Unlike older tools (e.g., CacheMan), CacheSet works across NT-based Windows versions and immediately applies changes.

Key features / actions

* Real-time display: shows current cache size (updated twice per second) and peak size since last reboot.
* Set minimum and maximum working-set sizes: enter values and click Apply. Errors appear if values violate system limits (max < min, min below system minimum, or max above system maximum).
* Reset: restore the cache working-set values that were active when CacheSet was started.
* Clear: force the cache to release all of its working-set pages (this makes those pages available to other programs; the cache can grow again as needed). This is not the same as flushing cached file data to disk.
* Command-line support: you can run CacheSet with two arguments to set min and max silently — useful for startup configuration.
  * Usage: CacheSet \[minimum working set] \[maximum working set]

How it works (internals)

* CacheSet queries and sets cache sizing via NtQuerySystemInformation and NtSetSystemInformation.
* Those calls lead to MmAdjustWorkingSetSize, which adjusts or trims working sets. A special parameter causes the system cache working set to be adjusted rather than the current process.
* Passing -1 for both min and max triggers a working-set clear.

Notes and requirements

* Administrative privilege: on NT 4.0 SP4 and later, the "Increase Quota" privilege is required; CacheSet enables this privilege so it works on SP4.
* Platform support: Client — Windows Vista and higher; Server — Windows Server 2008 and higher.

Downloads and run

* Download: <https://download.sysinternals.com/files/CacheSet.zip> (417 KB)
* Run now from Sysinternals Live: <https://live.sysinternals.com/Cacheset.exe>

Last updated: 12/16/2021

(Original article includes a screenshot and additional links on the Microsoft Sysinternals site.)
