In modern corporate networks, collaborative software development environments, and media editing suites, workstations rely on Server Message Block (SMB) network shares hosted on Windows Server or Network Attached Storage (NAS) appliances. To minimize latency and reduce network traffic over high-latency connections, the Windows 11 SMB client aggressively caches file metadata, directory listings, and file existence checks locally in RAM.
While client-side caching improves interactive performance over slow Wi-Fi or VPN links, it can cause severe friction in multi-client collaboration environments. For instance, when one user creates, renames, or deletes a file on a shared network drive, other Windows 11 clients frequently fail to see the changes for several seconds due to stale directory caches. Conversely, over high-speed 10GbE local networks, disabling or shortening these cache lifetimes provides instant, real-time file visibility. Using PowerShell, administrators can inspect and calibrate SMB cache lifetime parameters to balance performance and freshness.
Understanding SMB Client Metadata Cache Types
The Windows SMB client manages three distinct cache timers governed by the SmbClientConfiguration subsystem:
- DirectoryCacheLifetime (Default: 10 seconds): Caches directory contents and folder enumerations. When a user opens a folder or a script lists files, Windows reuses the cached file list until this timer expires.
- FileInfoCacheLifetime (Default: 10 seconds): Caches file metadata, including file sizes, timestamps (creation, last write), and security attributes. If another client updates a file on the server, the local client may read stale attributes until this timer lapses.
- FileNotFoundCacheLifetime (Default: 5 seconds): Caches negative search queries (“file does not exist”). If an application attempts to access a file before another process finishes saving it to the share, Windows caches the negative result. Subsequent checks within 5 seconds fail immediately without querying the server.
Inspecting Current SMB Cache Configurations in PowerShell
To inspect your current SMB client cache settings, open an elevated PowerShell prompt on Windows 11 by right-clicking Start and selecting Terminal (Admin).
Execute the Get-SmbClientConfiguration cmdlet filtering for cache properties:
Get-SmbClientConfiguration | Select-Object DirectoryCacheLifetime, FileInfoCacheLifetime, FileNotFoundCacheLifetime
The output returns the configured durations in integer seconds:
DirectoryCacheLifetime : 10
FileInfoCacheLifetime : 10
FileNotFoundCacheLifetime : 5
Disabling SMB Metadata Caching for Real-Time File Synchronisation
In high-throughput local environments—such as software build clusters, multi-user CAD drafting, video rendering farms, or automated file processing pipelines—stale cache entries cause build errors and synchronization collisions. Setting cache lifetimes to 0 forces the Windows 11 SMB client to query the file server directly on every request.
To disable all three metadata caches simultaneously, run:
Set-SmbClientConfiguration -DirectoryCacheLifetime 0 -FileInfoCacheLifetime 0 -FileNotFoundCacheLifetime 0 -Force
Verify that the changes were applied:
Get-SmbClientConfiguration | Select-Object DirectoryCacheLifetime, FileInfoCacheLifetime, FileNotFoundCacheLifetime
With caching disabled, newly saved files, renamed assets, or deleted folders appear immediately across all connected client machines without requiring manual File Explorer refreshes (F5).
Optimising Cache Lifetimes for High-Latency VPN and WAN Links
When remote employees connect to corporate file shares over high-latency broadband, cellular, or VPN connections (where ping times exceed 50ms), querying the server for every file attribute causes severe browsing sluggishness. In this scenario, extending cache lifetimes reduces round-trip network hops and significantly accelerates File Explorer responsiveness.
To configure extended caching suitable for remote telecommuters (e.g., 60-second directory cache and 30-second file info cache), execute:
Set-SmbClientConfiguration -DirectoryCacheLifetime 60 -FileInfoCacheLifetime 30 -FileNotFoundCacheLifetime 10 -Force
This configuration permits Windows to reuse local directory structures during navigation, making remote share browsing feel nearly as responsive as local NVMe storage.
Configuring SMB Cache Settings via Registry Editor (Alternative Method)
If PowerShell cmdlets are restricted in your environment, SMB cache lifetimes can be configured directly in the Windows Registry under the LanmanWorkstation service key.
The corresponding registry paths are located at:
HKLM:\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters
You can set or adjust these values using PowerShell’s registry provider:
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" -Name "DirectoryCacheLifetime" -Value 0 -Type DWord
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" -Name "FileInfoCacheLifetime" -Value 0 -Type DWord
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" -Name "FileNotFoundCacheLifetime" -Value 0 -Type DWord
Restoring Default Windows 11 SMB Cache Values
If you encounter excessive network congestion on local routers after disabling caching, restore the default operating system values at any time:
Set-SmbClientConfiguration -DirectoryCacheLifetime 10 -FileInfoCacheLifetime 10 -FileNotFoundCacheLifetime 5 -Force
Restarting the Workstation service or rebooting the machine commits the restored values to memory:
Restart-Service -Name LanmanWorkstation -Force
By calibrating SMB client metadata cache lifetimes in Windows 11, administrators can tailor network performance to specific workload profiles—delivering zero-latency file accuracy for local production teams while optimizing bandwidth over remote WAN links.