ConfigMgr 2012 Client Cache – Part 1: Overview
ConfigMgr 2012 Client Cache – Part 1: Overview
I’ve been asked a few times lately about how the Client Cache works in Configuration Manager, where is it, what size it should be set to, how it behaves etc. so I thought that maybe it was time for a blog!
I’m intending for this to be split into two parts:
1 – Overview
2 – Enumerating the Client Cache
What is it, where is it, and how big is it?
Essentially the client cache is a temporary download location for software, applications and software updates that are deployed to a client. By default the client cache is located %windir%\ccmcache but you do have the option of changing this at install time by using the SMSCACHEDIR parameter e.g. CCMSetup.exe SMSCACHEDIR=C:\Temp.
By default the cache size is 5120 MB, but again we can change this by using the SMSCACHESIZE parameter at install time e.g. CCMSetup.exe SMSCACHESIZE=10240. This would install the client with a cache size of 10GB. You can also change these settings post install either directly on the client itself using the Control Panel applet (See below), or for larger scale changes, by deploying a script.
Determining the size of the cache
So, what determines how big the cache should be, and what do I have to bear in mind when I set the cache size? Essentially, you need to ensure that your cache size is larger than any deployment you are going to send to a client. Software updates also use the client cache, but software updates are NOT restricted by the cache size and will always attempt to download to the cache
If the client attempts to download content that is greater than the size of the cache, the deployment will fail due to insufficient cache size and Configuration Manager generates a status message with the ID of 10050.
If the client attempts to download content that is less than the size of the cache but the cache is currently full, all required deployments keep retrying until the cache space is available, until the download times out, or until the retry limit is reached for the cache space failure. If the cache size is increased later, the Configuration Manager client attempts to download the package again during the next retry interval. The client tries to download the content every four hours until it has tried 18 times.
If the cache size is increased later, the behaviour of required programs and required applications are different. A required program will not automatically retry to download, you need to redeploy the content. As Applications are state-based, the client will automatically retry the download when it next receives client policy
Bear in mind that if there are required dependencies on an application, these will also be downloaded as part of a deployment. So actual total cache cost of application = Application + Dependencies
Cache Maintenance
So, does the cache actually maintain itself? Well, content remains in the cache for at least 24 hours, after that time it’s available to be overwritten by new content if it requires the space. If you configure your packages to persist content in the client cache, the client will not automatically delete the package/overwrite content in the cache. If the client cache space is used by packages that have been downloaded within the last 24 hours and the client must download new packages, you can either increase the client cache size or choose the delete option within the control panel applet of the client to delete contents of the cache. (See screenshot above)
So, that’s it for Part 1, an overview of the cache, the way it behaves, and how it’s maintained. For Part 2 we’ll look at how we can enumerate the client cache and pull back some more information on it back into Configuration Manager, so that we can then report on it.
Comments
Anonymous
January 01, 2003
Hi Vinod, It will only overwrite existing cache files that are over 24 hours old, the retry scenario takes effect when the existing cache files have been downloaded within the last 24 hours. Regards SteveAnonymous
January 01, 2003
so.... where's part 2?Anonymous
July 09, 2013
Hi, I believe when the client cache content is full and client attempts to download content that is less than the size of the cache, then it deletes some of the existing cache files and downloads. I have never seen a retry scenario. Regards, VinodAnonymous
February 27, 2014
Was Part 2 of this article ever posted?Anonymous
March 12, 2014
Did you guys forget about Part 2, or is it still in the works?Anonymous
August 19, 2014
Hi,
Is there a Part 2 available?
W.BaAnonymous
April 29, 2015
Thanks for posting. Nice. I was expecting to see part 2 addressing maybe how to empty client cache and increase its size in enterprise environment.Anonymous
June 18, 2016
Hi Steve,As we see, 'Amount of disk space to use (MB)' has some pointer to drag where you can see the highest size that you can set. How do i get that in VB Script or powershell? If we talk about Total Size of cache, it will return the current total size configured. Please help.Regards,JayAnonymous
November 10, 2016
Informative... Thanks Steve!Anonymous
March 24, 2017
Is something like this overkill for managing the CCMCACHE folder? http://rzander.azurewebsites.net/sccm-config-item-to-cleanup-ccmcache/ Our environment uses a 25 GB cache size because some applications are very large. Because of this, nothing really ever gets overwritten. I'd like to automate some kind of cleanup and am looking to see if going with something less complex would be better.Thanks.Anonymous
August 22, 2017
Today, I deleted all files in the Cache using the Configuration Manager control panel (checked, they're gone). Cache is 10 GB (10240 MB); content is 4 GB. Still complains about space. I know it's large, but still less than half the cache size. I increased the Cache to the next 'step' in the dialogue: 14 GB (14344 MB) and it accepted (started to download) when I retried.What I'd like to know is: what is the ratio of data-source to cache size, that constrains the maximum size a single package/application data source can be? It's not 100%, it's not even 50% according to my test above. What is the ratio?Anonymous
October 13, 2017
Thanks for the post, Steve. Is part 2 out there somewhere - I can't seem to find it.Anonymous
March 29, 2018
Hi Steve, I was also not able to find part# 2 of ConfigMgr 2012 Client Cache. Please let us know the link. Part# 1 was helpful in understanding and mainly in trouble-shooting issues during software distribution process in reference to low CCMCache space. It also helped me to decide and come up with a different CCMCache size number for regular corporate end-user v/s application packagers (they install packages/applications in excess on their test workstations). They both are different type of users of software distribution features. Again, if you can provide info regarding Part# 2 it will be helpful for all of us.