SharePoint 2019 – Check Distributed Cache Memory

When the SharePoint 2019 is installed, the Distributed Cache service automatically allocates the memory required, but in the event that you increase the memory on the servers later down the track, you will need to manually adjust the memory allocation on the Distributed Cache servers.

1.) Get the Distributed Cache cluster.

Use-CacheCluser
Get-AFCacheHostConfiguration -ComputerName <ComputerName> -Cache Port "22233"

2.) Stop the Distributed Cache Service. Repeat on all hosts in the Distrubuted Cache cluster.

Stop-SPDistributedCacheServiceInstance

3.) Increase the memory allocation. Repeat on all hosts in the cluster.

Update-SPDistributedCacheSize -CacheSizeInMB <#MB>

4.) Restart the Distributed Cache Service

$InstanceName = "SPDistributedCacheService Name=AppFabricCachingService"
$ServiceInstance = Get-SPServiceInstance | ? { ($_.Service.ToString() ) -eq $InstanceName -and ($_.server.name) -eq $env:COMPUTERNAME}

ServiceInstance.Provision()

Repeat on all servers in the Cluster.

What is the Distributed Cache Service in SharePoint?

It is a service that provides an additional caching mechanism (introduced in SharPoint 2013 & later) to support SharePoint features like Object Cache, BLOB Cache & Page Output Cache.

It enabld quick data retrieval without any dependency on SQL Server databases, as it stores everything in memory, aka cache.