Intro to content caching
Content caching is a service in macOS that speeds up downloading of software distributed by Apple and data that users store in iCloud by saving content that local Apple devices have already downloaded. The saved content is stored in a content cache on a Mac, and is available for other devices to retrieve without going out over the internet. You can find the current list of supported content types in the Apple Support article Content types supported by the caching service.
You can use content caching on networks that use network address translation (NAT) for the content cache and all devices, on networks consisting of publicly routable IP addresses, and optionally for devices tethered to a Mac (for example, when provisioning many devices at once using Apple Configurator). Apple devices automatically contact a nearby content cache without any configuration by using a lookup service that maps client private and public IP addresses to configurations registered with Apple from Mac computers with content caching turned on. Because any Apple device on a network silently and automatically uses content caching if available, detailed information on individual assets requested by individual specific clients is not available for privacy reasons. You can, however, query aggregate content caching usage statistics to help measure and gauge performance. For more information, see Plan for and set up content caching.
Important: For best results, deploy content caching on a Mac that has a single wired Ethernet connection as its only connection to the network. Content caching can use a Wi-Fi connection instead of Ethernet, but performance might be affected.
Restrict content caching
If a Mac is enrolled in a mobile device management (MDM) solution, a restriction can be used to keep the user from turning on content caching. This prevents the Mac from downloading and storing software distributed by Apple and data that users store in iCloud.
How content caching works
After you turn on content caching on a Mac, the Mac keeps a copy of all content that devices (called clients) on the local network can download. Content can also be downloaded from multiple iPhone or iPad devices if they’re tethered to a Mac using a cart or USB hub. You can specify ranges of client IP addresses (for example, like one or two subnets) that a content cache is best positioned to serve, and optionally you can make that content exclusive to those clients by choosing the “Devices using custom local networks” option. The options are:
Cache content for
Select an option that describes which devices this computer will cache content for:
My local networks
Select an option that describes your network:
This is used to generate configuration for a DNS TXT record and is available only if you select “use custom public IP addresses” for the “My local networks” option.
For example, when the first client on your network downloads a macOS update, the content cache keeps a copy of the update. When the next client on the network connects to the App Store to download the update, the update is copied from the content cache rather than from the App Store.
Because the local network is normally much faster than the internet, the second client (and all subsequent clients) download updates much faster.
By default, content caching is limited to a specific subnet, but you can set it to provide content caching for:
All combinations of subnets of the local network that share a common public IP address
Any combination of subnets of publicly accessible IP addresses (with additional DNS settings being required)
How subnets and caches interact
If your network has multiple subnets that share the same public IP address, all the subnets can take advantage of a single content cache.
When your network has more than one content cache, the content caches automatically become peers and can consult and share cached software. When a requested item isn’t available on one content cache, it checks its peers for the item. If the item is available, it’s downloaded from the peer. If it’s not available, the content cache downloads the item from one of its parents, if any are configured, or from Apple through the internet. Clients automatically select the right content cache when more than one is available.
Note: If optionally turned on, user iCloud data is only stored on one content cache and is not replicated across peers or parents. An Apple device maintains the affinity for that specific content cache for its iCloud data for as long as possible.
Where cached content resides
The default location for cached content is the startup volume. You can choose an alternate location and specify how much of the volume is used by content caching. When the storage space for the cached content reaches the maximum you specified, or when the available space on the volume runs low, the content cache deletes content that hasn’t been used recently to make space for the next request.