Below, we explain how this tool works, the steps to configure it and what parameters you can adjust to get the most out of it.
What is content cache and how does it work on macOS?
Content caching is a feature that saves a local copy of certain data that your Mac downloads from the Internet. When you visit a website or access online services, some data is stored on your device. This means that the next time you access that content, your Mac will load it from its own cache, instead of downloading it again. This results in faster loading and less dependence on the Internet connection.
How to enable content cache on your Mac
To activate this feature, you must go to System Settings > General > Sharing > Content Cache. When you activate it, you will have the option to choose what type of content you want to cache: “All content”, “Shared content” or “iCloud content”. Each of these options will allow you to store different types of files and optimize the loading speed according to your preferences.
Once the cache is activated, the system will ask you to restart your Mac or any other device for the changes to take effect.
Advanced settings for advanced users
Apple allows users to configure certain content cache settings to customize the performance of their Mac. These settings are saved in a file .plist called com.apple.AssetCache.plist, located in the /Library/Preferences/ path of the startup disk. This XML text file can be edited to change certain configuration values, although Apple advises that only a few specific options should be changed. If you edit settings that are not allowed, you could cause system crashes.
In addition to modifying the file .plist directly, you can use the tool AssetCacheManagerUtil in the Terminal application. This line command allows you to change cache settings without touching the file .plist. You just need to open Terminal and type man AssetCacheManagerUtil to see a complete list of available commands. Every time you change a setting, you can use the reloadSettings command to force the settings to be reloaded.
Parameters that you can adjust and how they influence
Some of the most useful content cache parameters include the maximum storage size, time limits for retaining content, and the level of information that is recorded in the cache logs. You can also specify the storage location for the cache if you prefer it to be on an external drive. These options allow technically savvy users to further optimize their system.
Customizing these values in the file .plist or through AssetCacheManagerUtil requires you to be careful with the format of the data. Some advanced settings use JSON (JavaScript Object Notation), a data language based on key-value pairs that allows for a complex configuration structure. JSON is relatively simple to write once you understand the syntax and the use of curly braces and commas to separate data.
Recommended changes and precautions
If you decide to make changes to your content cache settings, it is important that you respect the limit values that Apple establishes. Exceeding these limits can cause the content cache to malfunction or even cause system errors. Apple also provides a complete list of keys you can change in the com.apple.AssetCache.plist file, accessible in the Apple Platform Deployment Guide.
By customizing these settings, you can control how your Mac stores, loads, and deletes cached content. Taking advantage of these advanced settings is especially useful for those who use the Mac in work or study environments where fast Internet access is critical.
With this tool, Apple offers power users a way to better manage their system performance, making browsing the Internet and loading content faster and more efficient.