Almost everyone who uses the internet understands how inconvenient it can be when downloading a photo, video, app or update takes a long time. To save time, almost everyone has transferred files from friends or coworkers who have previously downloaded them.
Content caching on Mac is similar to sharing files with friends or coworkers. Content caching is a macOS service that was developed by Apple so that organizations or people using Apple devices can reduce the load on the internet and make downloads much faster.
Mac content caching is usually used in networks where there are a lot of Apple devices.
If content caching is switched on in a Mac, whenever an app, app update, or even iCloud documents are downloaded on a device in the same network, a copy of it gets stored in the Mac. This is done so that if the same content needs to be downloaded on another device in the network, it will be downloaded from the Mac rather than the internet.
Content caching can be used in two types of networks:
- Any network that has a NAT (Network Address Translation) environment for all the devices.
- Any network that has a publicly routable IP address for the whole network.
History of content caching on Mac
Apple experimented with content caching in different forms before they finalized with the currently available version.
Tethered caching was a service similar to content caching. With this feature, Mac devices could not only share an internet connection with iOS and iPadOS devices but would automatically cache content from these devices. The main downside to this feature was that the devices had to be connected to the Mac using a USB connection.
Untethered caching or content caching was first introduced as a service of macOS server. Using this feature system admins could allocate a specific portion of device storage just to cache the software updates.
A complete guide to Mac device management
Organizations can use UEMs to configure and manage endpoints while increasing staff productivity. Learn how to leverage Hexnode's Mac management features to make the most out of your Mac endpoints.Download White paper
With the untethered caching feature, devices connected in a local network could get updated from the cache rather than from the App store. This opened up the idea of saving internet data usage with the help of content caching.
Along with the macOS 10.13, High Sierra update, content caching was reintroduced as a Mac device feature. From then on, content caching could be enabled on Mac devices via the system preferences tab.
How does content caching work?
- When content caching is enabled on a Mac, a local copy of every file, update, or app downloaded by an Apple device in the same network is saved on the Mac.
- The next time someone else in the network tries to download the same file, the file is downloaded from the Mac rather than the internet. The Mac with local copies of files is called the content cache. Not only does downloading files from the content cache reduce internet use, but it also speeds up the entire download process.
- If a file/app/software is not available on the content cache then it automatically gets downloaded from the internet.
Content types that are supported for content caching
Most of you might be asking the question, “will all data in a network get cached?”. The simple answer is no. Only selected content can be stored in a content cache and the system admin configuring the content cache can specify what content to be stored from that list.
List of content that can be stored in a content cache:
- OS updates and Internet Recovery images (macOS 10.13.5 or later).
- Apps and updates downloaded from the Mac App Store.
- GarageBand – downloadable content.
- iCloud data – photos and documents.
- Apple book content.
- Xcode downloadable components (Xcode 10.2 or later).
- iOS 7 and later and Apple TV
- iOS and tvOS updates.
- Apple TV screensavers (tvOS 12.2 and above).
- iOS and tvOS apps and updates.
- On-demand resources support for iOS 10 and above and tvOS 10 and above.
- iCloud data – photos and documents (iOS 9 and above).
- iTunes U course materials from the iOS App Store and Apple Books, as well as uploaded instructor materials such as audio, video, iWork, and iBooks Author files.
- Apple book content.
- Certain mobile assets, like Siri high-quality voices, language dictionaries and more.
- watchOS 7
- watchOS apps and app updates.
- iCloud data caching.
What do you need to set up a content cache in your network?
Some things are unavoidable to set up a content cache in your network.
- A Mac computer that is powered on all day. This Mac computer would serve as the content cache for all other devices in the network.
- A stable connection to the internet for the Mac serving as the content cache.
- A considerable amount of free space on the Mac that is to be used as the content cache.
- The Mac that is supposed to be used as the content cache should have macOS 10.13, High Sierra, or later.
According to Apple, the best way to connect the content cache to the network is using ethernet and not using Wi-Fi. When heavy loads are experienced, Wi-Fi might fail to perform as well as ethernet.
Setting up a content cache in your network
- To set up content cache in your network, select a Mac device that is going to serve as the content cache.
- On that device, go to the Sharing Preferences tab in System Preferences.
- Select the Content Caching option, be sure not to check the box at first.
- On the tab that pops up, you can select the type of content that is to be cached and opt whether or not to share an internet connection.
- After you are done with the settings available here, you can click the Options button available at the bottom of the page. Here, you can specify which volume should serve as the content cache, decide the size of the cache and even reset an already existing cache.
If you thought that these are all the things you can configure in a content cache, then you are in for a surprise. There is an Advanced Options available which can be unlocked using the Option key on the keyboard. On pressing the Option key, Advanced Options will pop up instead of Options.
Advanced Options give you much more control over your content cache. You can set up the cache size, type of clients to provide content caching for, peers and parents. Peers and Parents settings are mainly used for configuring multiple content caches in the same network.
After all the options are configured, you can return to the Sharing Preferences tab and check the box near the Content Caching option. Once the box is checked, keep an eye out for the status indicator, which is a circular icon right next to the heading “Content Caching:”.
The status indicator can have any of these four colors:
- Green: This indicates that Content caching is up and running.
- Yellow: This indicates that the content caching is either not available or that it is starting or stopping.
- Dark grey: This indicates that content is getting moved.
- Light grey: This indicates that the content cache is switched off.
Once the status indicator turns green, all the client devices are advised to be restarted. This is to ensure that all clients discover the changes made to the content cache. All client devices have the capability of recognizing changes automatically, but it takes some time. When you restart a device, the change is recognized instantly.
Multiple content caches in a network
Multiple content caches are commonly used in networks with a large number of devices. This is done to reduce the stress on the caches and the network. When configuring several caches, it’s best to construct peer and parent relationships between them so that subsets of the network can be created and their data backed up by parent caches.
Peers: – Peers are content caches in the same network. Peers can be set using the network type in Advanced Options in Content Caching Preferences.
Parents: – The Parents option in the Advanced options of the Content Caching Preferences can be used to create a hierarchy among your caches. Caches that share content with other caches are known as parent caches.
Content in your network can be adequately backed up without putting too much strain on the bandwidth by correctly setting up peers and parents.
The parent-peer connection might be described for two purposes:
- To optimize content sharing capability, which means that if one peer fails to send material to a device, other peers or parents in the network will be able to do so.
- To increase the size of the content cache. More data can be cached here.
The maximum number of peers should be specified for the first result, and peers should be specified only where necessary for the second result.
Content caching best practices
The two main factors that affect the performance of content caching on a Mac are connectivity and hardware configurations. According to Apple, it is always best to connect your content cache to the network using an ethernet cable.
It is always recommended to use a high-speed and high bandwidth internet connection if possible. A large content cache size is recommended for networks with a large number of devices and a large amount of data being downloaded.
It is possible to analyze the performance of content caches by checking the processor usage on the device. The AssetCache process in the Activity Monitor shows the content cache activity. If the processor usage is high, then it usually means that your content cache is working at maximum capacity.
If high processor usage for the AssetCache process is a regular sight, consider adding more content caches to your network. This can reduce the load on the cache.
In short, content caches are a good way to not only save data in your network but also for backing up data that is downloaded in a network. Even though setting up a content cache might be a bit confusing, it is always good to have a content cache in your network.
Sign up for a free trial
Sign up for a 14-day free trial with Hexnode and explore the Mac device management features with Hexnode.Sign up
Share your thoughts