What is the Caching Service?

The caching service speeds up the downloading of software distributed by Apple and of data in users’ iCloud accounts by caching content that local Mac computers, iOS devices, and Apple TV devices have already downloaded.

Caching server content types

https://support.apple.com/en-us/HT204675

Configure advanced cache settings

https://help.apple.com/serverapp/mac/5.2/#/apd5E1AD52E-012B-4A41-8F21-8E9EDA56583A

macOS Server: Performance Mode

https://support.apple.com/en-us/HT202528

Turn on performance mode for macOS Server
Performance mode changes system parameters so your Mac can take better advantage of its hardware for demanding server applications like serving multiple web or file sharing clients. Macs with macOS Server that need to run high-performance services can turn on performance mode to dedicate additional system resources for server applications. 

OS X El Capitan 10.11 and later
To turn on performance mode in OS X El Capitan 10.11 and later, use the nvram command to adjust the boot-args NVRAM variable.  
Note: If you reset NVRAM, this setting will be cleared.
This command displays the boot-args NVRAM variable. If you see serverperfmode=1, performance mode is already turned on.

Launch Terminal.app and type: 

nvram boot-args

If performance mode isn't already turned on, you can enable it by setting serverperfmode=1 in the boot-args NVRAM variable with this command:

Launch Terminal.app and type:

sudo nvram boot-args="serverperfmode=1 $(nvram boot-args 2>/dev/null | cut -f 2-)"

To disable performance mode, use this command:

Launch Terminal.app and type:

sudo nvram boot-args="$(nvram boot-args 2>/dev/null | sed -e $'s/boot-args\t//;s/serverperfmode=1//')"

 

Apple Caching Server commands

Here are some helpful commands as well as location for files to help manage the Appel Caching servers.

Status of caching server

This will include information on all services related to the caching server

Launch Terminal.app and type: 

sudo serveradmin fullstatus caching

Enable Caching service debugging:

Launch Terminal.app and type:

sudo serveradmin settings caching: LogLevel = verbose

Disable Caching service debugging:

Launch Terminal.app and type: 

sudo serveradmin settings caching: LogLevel = error

Show the IP address of the clients in the debug log:  

Note: This proved to be really helpful to show which clients were caching data during initial testing

Launch Terminal.app and type:

sudo serveradmin settings caching:LogClientIdentity = true

Filter the peers a caching server will use: (Optional)

Note: setting this to a boolean “true” will use the IP ranges set in the network permissions for caching clients

Launch Terminal.app and type:

sudo serveradmin settings caching:PeerFilterRanges = true

After setting the private and public IP ranges for Caching it’s best practice to use the following command to ensure that the private and public ranges are talking but that they are only talking to the specific private IPs. After executing the command you can check the plist to confirm filtering.

Launch Terminal.app and type:

defaults write /Library/Server/Caching/Config/Config.plist PeerFilterRanges -bool TRUE

ServerDiagnose

Command to Troubleshoot and capture logs of OS X Server. 
Location of executable: /Applications/Server.app/Contents/ServerRoot/usr/sbin

Launch Terminal.app and type:

sudo serverdiagnose

Enable caching service discovery across multiple public IP addresses

If your network uses multiple public IP addresses to connect to the Internet, such that a caching server might register using a different address than a client uses for discovery, you need to provide both the servers and the clients with a list of those addresses. Apple uses these lists to cross-match registration and discovery requests involving multiple public IP addresses.

Caching servers get this address information from the server administrator using the Server app.

In order to avoid manual configuration of clients, caching service uses DNS TXT records to publish the public IP address information for clients on your network. The TXT record needs to be published in the default DNS search domain used by your clients.

Configure caching server to support multiple public IP addresses

https://help.apple.com/serverapp/mac/5.2/#/apd6015d9573

To Test the TXT DNS Record:

Launch Terminal.app and type:

dig -t TXT _aaplcache._tcp.yourdomain.com

Note: Replace "yourdomain.com" with your real domain 

Launch Terminal.app and type:

dig @192.168.1.1 -t TXT _aaplcache._tcp.yourdomain.com

Replace "192.168.1.1" with your real primary and secondary DNS servers

Confirm Caching Server from macOS Sierra:

The AssetCacheLocatorUtil located at /usr/bin/AssetCacheLocatorUtil
When run will tell you if your host mac detects any caching servers on your network.

Launch Terminal.app and type:

AssetCacheLocatorUtil

Download the PDF.

Locations
New York
ConnecticutFloridaLouisianaChicago 

Tel: (866) 518-9672

Corporate Headquarters
New York

3900 Veteran's Memorial Hwy. Suite 110
Bohemia, NY 11716
Tel: (866) 518-9672
hcs-ny@hcsonline.com

Connecticut

65 High Ridge Road #510
Stamford, CT 06905
Tel: (866) 518-9672
hcs-ct@hcsonline.com

Florida

3321 SW 194th Terrace
Miramar, FL 33029
Tel: (866) 518-9672
hcs-fl@hcsonline.com

Louisiana

218 Barksdale Drive
Broussard LA 70518
hcs-la@hcsonline.com

Chicago

4 Knollwood Place
Joliet, IL 60433
hcs-il@hcsonline.com

London

10 Grosvenor Court
Rayners Road
London SW15 2AX UK

Apple Consultants Network