Content Cache settings in macOS Sequoia.
Email Facebook x.com Reddit
Advanced configuration options control how your Mac stores cached content. Here's how to change the settings.
Content caching controls which online content is stored locally on macOS when you visit websites and other online servers.
When you visit a website, some data (content) is downloaded and stored locally on your Mac. This is done so that the next time you access that content, it can be loaded more quickly from the cache – instead of having to go online again.
To use content caching on your Mac, you must first enable it in System Preferences -> General -> Sharing -> Content Caching.
You will then be presented with a table that allows you to specify which content you want to cache: All Content, Shared Content, or iCloud Content.
You can also choose whether you want to share your Internet connection and (if you click the Options button), where to store the content cache, and how large it should be. After you turn on content caching, you'll be prompted to restart your Mac or other devices.
Where the cache settings are stored
Your Mac stores its content cache settings in a .plist (XML) file at /Library/Preferences/com.apple.AssetCache.plist on your startup disk. You can open this file in a text editor or Apple's Xcode to change its settings.
Apple specifically says that you can only change some of the settings in this file. Other settings are prohibited, and changing them could cause your Mac to crash or become unusable.
See the full list below.
File com.apple.AssetCache.plist.
AssetCacheManagerUtil
If you don’t want to edit the settings directly in the .plist file, you can instead change them in the macOS Terminal app using the AssetCacheManagerUtil command-line tool.
For more information about AssetCacheManagerUtil in Terminal, type:
man AssetCacheManagerUtil and press Return.
You’ll need to use the sudo prefix when using the AssetCacheManagerUtil tool.
Once you’re done changing the content caching settings, force a reload of the settings using the reloadSettings option of the AssetCacheManagerUtil tool:
sudo AssetCacheManagerUtil reloadSettings
Apple says that some values require you to stop and restart content caching in System Preferences.
You can also use the Terminal’s system defaults to set basic and advanced settings. To view all default content cache settings in Terminal, type:
sudo AssetCacheManagerUtil settings and press Return.
Editing a .plist file in Xcode.
JSON
For more advanced commands, you'll need to know how to use the Terminal's defaults system and how to write JSON (JavaScript Object Notation) to pass parameters to the defaults system.
JSON is essentially key-value pairs stored as plain text that can be nested with data separated by commas and curly braces.
For example, '( { first = 10.0.0.1; last = 10.0.0.254; }, { first = 10.1.0.1; last = 10.1.0.254; } )' contains an array of 2 dictionary keys, where the first and last keys are set to different internet addresses.
JSON is actually quite easy to write and understand once you know how syntax and nesting works.
JSON is widely used throughout the internet to transfer and store data. A dictionary is simply a collection of key/value pairs bundled together for easy access.
Which values to change
Some values in com.apple.AssetCache.plist must be sandwiched between two valid values. Do not change them to anything outside of their valid ranges.
Apple provides a full list of the keys you can change in com.apple.AssetCache.plist in the Additional Content Caching Settings on Mac section of the Apple Platform Deployment Guide.
By changing these values, you can change quite a bit about how the content cache behaves, including timeouts, cache size limits, disk space, alerts, and more.
You can also set the verbosity level of the cache logs if you want more information about its behavior.
By changing these settings, you can control and change how your Mac stores, downloads, and deletes content caches.
Follow AppleInsider on Google News