Content cache settings in macOS Sequoia.

How advanced content caching settings on the Mac works

by · AppleInsider

Last updated 16 hours ago

Advanced configuration parameters control how your Mac stores cached content. Here's how to change the settings.

Content caching controls what internet content gets stored locally in macOS when you visit websites and other online servers.

When you visit a site, some of the data (content) gets downloaded and stored locally on your Mac. This is so that if you access that content later, it can be loaded more quickly from the cache - instead of having to make more trips to the internet to fetch it again.

In order to use content caching on the Mac, you must first enable it in System Settings->General->Sharing->Content Caching.

When you do this you'll get a sheet allowing you to set what content you want cached: All Content, Shared Content, or iCloud Content.

You can also select whether or not 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 content caching on, you'll be prompted to restart your Mac or other devices.

Where the cache settings are stored

The Mac stores the 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 in Apple's Xcode, to edit its settings.

Apple specifically says only to change some of the settings in this file. The others are off-limits, and if you change them, it could cause your Mac to malfunction or be rendered unusable.

See below for the full list.

The com.apple.AssetCache.plist file.

AssetCacheManagerUtil

If you don't want to edit the settings directly in the .plist file, you can instead edit them in macOS's Terminal app by using the AssetCacheManagerUtil command-line tool.

To get more info on AssetCacheManagerUtil in Terminal type:

man AssetCacheManagerUtil and press Return.

You'll need to use the sudo prefix when using the AssetCacheManagerUtil tool.

When you're done changing your content cache settings, force a reload of the settings by using the reloadSettings option for the AssetCacheManagerUtil tool:

sudo AssetCacheManagerUtil reloadSettings

Apple states some values require you to stop and then restart Content Caching in System Settings.

You can also use the defaults system in Terminal to set simple and advanced settings. To view all standard content cache settings in Terminal type:

sudo AssetCacheManagerUtil settings and press Return.

Editing the .plist file in Xcode.

JSON

For more complex commands you'll need to know how to use the defaults system in Terminal, and how to write JSON (JavaScript Object Notation) to pass parameters to the defaults system.

JSON is essentially key-value pairs stored in plain text, which 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 keyed dictionaries with first and last keys set to different internet addresses.

JSON is actually fairly easy to write and understand once you know how the syntax and nesting works.

JSON is widely used all over the internet to pass and store data. A dictionary is just a set of key/value pairs bundled together for easy access.

Which values to change

Some of the values in com.apple.AssetCache.plist must be clamped between two allowable values. Don't change these to anything outside their allowed ranges.

Apple provides a complete list of the keys you can change in com.apple.AssetCache.plist in Advanced content caching settings on Mac in the Apple Platform Deployment Guide.

By changing these values you can alter quite a lot of how the content cache behaves including timeouts, limits on how big the cache can be, disk space, alerts, and more.

You can also set the verbosity level of the cache logs if you want more information about the way it behaves.

By altering these settings you can control and change how your Mac stores, loads, and deletes content caches.


3 Comments




3 Comments

avidrissman 1 comment · New User
About 12 hours ago


“Content caching controls what internet content gets stored locally in macOS when you visit websites and other online servers.”

This is the very first sentence in this article and it is completely and utterly wrong. The article goes on to be wrong in other ways.

macOS’s Content Cache is for caching Apple system updates, App store updates, and optionally user data in iCloud. This is literally specified in Apple documentation, the first result when you search for “macos content cache”. See https://support.apple.com/guide/deployment/intro-to-content-caching-depde72e125f/web .

The Content Cache has nothing to do with caching when you visit websites. Authority: me, a developer on Google Chrome.

Messing with the Content Cache settings is useful in situations where admins have to manage multiple computers, and they have plenty of documentation to help. This is an anti-helpful article; it should be retracted.

coolfactor 2331 comments · 20 Years
About 8 hours ago


exgeniustrainer 8 comments · 5 Years
About 7 hours ago


avidrissman said:
“Content caching controls what internet content gets stored locally in macOS when you visit websites and other online servers.”

This is the very first sentence in this article and it is completely and utterly wrong. The article goes on to be wrong in other ways.
I totally agree with Coolfactor.

Share Your Thoughts on our Forums ->
 

Sponsored Content

Bluetti's new Elite 200 portable power station provides 17 years of charging


Top Stories

M4 Mac mini review: The first redesign in years hides incredible computing power


Apple releases Final Cut Pro 11, along with updates to Logic Pro for Mac



Apple's smart display with smart home AI focus predicted for March 2025


Ultimate guide on how to use an external SSD as a working drive on macOS Sequoia


Holiday 2024 MacBook Buyer's Guide — Which Mac laptop you should buy?


Amazon drops early Black Friday deals on M4 Macs, 13-inch MacBook Air 16GB





Latest Exclusives

Apple Intelligence — The test applications that paved the way for Apple's generative AI


iPhone 16 features and designs that didn't make it out of prototyping


Apple's iPhone 16 case covers the new Capture Button, Spigen follows suit



Latest comparisons

M4 14-inch MacBook Pro vs M3 14-inch MacBook Pro compared: A portable speed boost


M4 Mac mini vs 2018 Intel Mac mini compared: It's time to move to Apple Silicon


M4 iMac vs 2019 Intel iMac compared: Five years makes a big difference