Manage the Distributed Cache service in SharePoint Server 2013
Applies to: SharePoint Server 2013
Topic Last Modified: 2015-06-02
Summary: Learn how to configure and manage the Distributed Cache service in SharePoint Server 2013.
The Distributed Cache service provides in-memory caching services and does not have a dependency on databases for several features in SharePoint Server 2013. Some of the features that use the Distributed Cache service include:
OneNote client access
Page load performance
Various caches that depend on the Distributed Cache service
The Following are the SPDistributedCacheContainerType enumerations to set or clear the distributed cache settings. The core API has namespace Microsoft.SharePoint.DistributedCaching.Utilities.
When the service is enabled, these features use the Distributed Cache for quick data retrieval. Blob Cache and Output Cache do not use a distributed caching service since these types of cache exist on each Web Front End server in the farm.
The Distributed Cache service can end up in a nonfunctioning or unrecoverable state if you do not follow the procedures that are listed in this article. In extreme scenarios, you might have to rebuild the server farm. The Distributed Cache depends on Windows Server AppFabric as a prerequisite. Do not administer the AppFabric Caching Service from the Services window in Administrative Tools in Control Panel.
Do not use the applications in the folder named AppFabric for Windows Server on the Start menu.
To start and stop the Distributed Cache service by using Central Administration
- In Central Administration, click Application Management.
- In Service Applications, click Manage Services on Server.
- On the Services on Server page, locate the Distributed Cache service.
- If the Distributed Cache service is started and you want to stop the service, under Action, click Stop. If the Distributed Cache service is stopped and you want to start the service, under Action, click Start.
To change the memory of the Distributed Cache service
(Optional) To check the existing memory allocation for the Distributed Cache service on a server, run the following command at the SharePoint Management Shell command prompt:
Get-AFCacheHostConfiguration -ComputerName ComputerName -CachePort “22233”
ComputerName is the computer name of the server that you are running the SharePoint Management Shell cmdlet on.
- Stop the Distributed Cache service on all cache hosts. To stop the Distributed Cache service, go to Services on Server in Central Administration, and Stop the Distributed Cache service on all cache hosts in the farm.
- To reconfigure the cache size of the Distributed Cache service, run the following command one time only on any cache host at the SharePoint Management Shell command prompt:
Update-SPDistributedCacheSize -CacheSizeInMB CacheSize
CacheSize is the cache size’s memory allocation assignment in MB. In the previous example, the cache size was calculated at 7168 MB for a server with 16 GB of total memory.
- Restart the Distributed Cache service on all cache hosts. To restart the Distributed Cache service, go to Services on Server in Central Administration, and Start the Distributed Cache service on all cache hosts in the farm.