Recently I came across a situation where one of my SCCM deployments was failing due to the client cache being too small, now for new machines you can set this in your client installation settings, but for existing machines I needed another solution.
For this, I created a small powershell script:
$Cache = Get-WmiObject -Namespace 'ROOT\CCM\SoftMgmtAgent' -Class CacheConfig
$Cache.Size = '10240'
$Cache.Put()
Restart-Service -Name CcmExec
I then created a package with the following command line:
Powershell.exe -executionpolicy bypass -File setcache.ps1
and deployed this to my clients.