Posted on 10-12-2020 04:11 AM
Hi all, we have content caching enabled on Mac minis in schools, however keep getting an issue where software updates can't install as there is not enough free disk space.
When this happens I try to run AssetCacheManagerUtil flushCache from a policy to clear the cache and make some room but I get the following error from that command:
2020-10-12 12:01:28.762 AssetCacheManagerUtil[59888:582539] Content caching did not flush its cache: Error Domain=ACSMErrorDomain Code=9 "required by your system administrator" UserInfo={NSLocalizedDescription=required by your system administrator}
Should probably point I have no access to these Macs other than with Jamf so looking for idea on how I can do it, without just reducing the amount of disk space I allow for cached content.
Posted on 10-12-2020 08:57 AM
Reset the cache and then set the amount of space that can be used for cache. This is the script I used to reset the cache.
#!/bin/bash
serveradmin stop caching
sleep 5
rm -rf /Library/Server/Caching/Data/
sleep 30
serveradmin start caching
serveradmin settings caching:CacheLimit = 450000000000
Posted on 10-14-2020 01:13 AM
Hi @ChrisTech , Thanks for this!
We are currently turning on, and configuring, Content Caching with a config profile - will trying to change the settings via this script, I am particularly thinking he limit piece, not get 'trumped' by the setting in the config profile?
Posted on 10-14-2020 06:46 AM
@ChrisTech Your script won't work on Mojave+ since Server.app (and therefore serveradmin) does not contain Content Caching anymore. And since the OP is using a profile to configure, that means he's on Mojave+.
Posted on 10-15-2020 01:23 AM
@patgmac We are indeed on Mojave+, Catalina in fact