SharePoint 2013 spdistributedcacheservice is a cache mechanism introduced by Sharepoint Server 2013. It is usually used for caching the following functions:
- Newsfeeds
- Authentication
- OneNote Client Access
- Security trimming
- Page load performance (directly affecting page loading and response speed)
Some caches are not cached through spdistributedcacheservice, for example:
- Blob cache (images, scripts, etc.), which are only cached on WEF Server
- Output cache (Asp.net page cache), also only cached on WEF Server
In fact, spdistributedcacheservice is a distributed cache system built using the appfabriccachingservice of window server 2012. Appfabriccachingservice is automatically installed when the SharePoint 2013 preparation kit is installed. The logical architecture of appfabriccachingservice is as follows:
In SharePoint 2013, cluster configuration is stored in the sharepoint_config database. The Cache Server can be any WEF server or app server.
The following describes how to configure spdistributedcacheservice: 1. Run the following SharePoint power shell commands in sequence on the WEF or app server where you want to deploy the cache.
A. Import the power shell Network Security Module
Import-modulenetsecurity
B. Enable Firewall Rules
Set-netfirewallrule-displayname "file & printer sharing (echo request-ICMPv4-In)"-enabled true
C. Add the local machine to the cache host cluster (cluster)
Add-spdistributedcacheserviceinstance
4. Set the local cache size to 2 GB. The default value is 5% of the local memory.
Update-spdistributedcachesize-cachesizeinmb 2048
Note: The cache size of a single machine should not exceed 16 GB, and should not exceed 40% of the total memory of the machine
2. Run the following command to verify the configuration result:
A. Get-cachehost
B. Get-cachehostconfig-computername rtatstuswspapp2-cacheport 22233
After spdistributedcacheservice is configured, the foliar loading efficiency is improved by about 10 ~ 20 times.
SharePoint 2013 spdistributedcacheservice introduction and Configuration