The App-V Client comes with the Registry Value “FileSize” in the “AppFS” key that indicates to control the App-V client’s cache size. This is not the case.
Instead, there might be a difference between the FileSize Registry value on the one hand and the actual maximum value and the value shown in the App-V Client Management Console on the other hand.
To adjust the maximum cache size using centrally controlled methods you have to initialize/flush the App-V cache or to use Microsoft’s App-V Cache Resizer Resource Kit tool.
You may define the size of the App-V cache using the SWICACHSIZE parameter during installation to set the maximum cache size to either a fixed value or to a define the reserved free disk space.
As a visible result, both the App-V Client Management Console and the Registry show the maximum Cache size.
If you want to decrease the cache size, you have to “initialize” or “flush” it. The described issue does not occure then.
If you want to increase the cache size afterwards, you simply may try to increase the FileSize RegValue, for instance by means of a Group Policy change or an automated Registry modification.
If you do that, the result will (of course even after several Reboots) look like this;
The Enforced Cache Size (i.e. the “real” Max Cach Size) case is set to the value shown in the MMC: 6,144 MB. The cache won’t grow beyond that.
So you increased you cache size by increasing the Registry Value but your applications still don’t fit into the Cache file. Strange, right?
As you may have noticed, modifying the Registry Value does not automatically modify the Enforced Cache Size, this is the lesson we have learned.
The Enforced Cache Size is a property of the App-V Virtual File System Driver, but not of the FileSize Registry value. This property can only be modified by using the right APIs of the driver.
When the value is modified using the MMC, actually two things happen: The MMC triggers the API to set the Driver’s Property. The Registry Value is set “only” as a side effect of that process.
Actually, there won’t be a “fix” for that behavior, because this is how Microsoft designed it.
But how can the Cache Size setting be adjusted properly? Well, there are some options:
(Note: All methods preserve the User Settings. They aren’t affected negatively by modifying the Cache File)
Increase Cache | Decrease Cache | Keep Cached content | Automated deployment | Clients supported | |
Client MMC | ![]() |
![]() |
![]() |
![]() |
4.1, 4.2, 4.5, 4.6 |
Cache Resizer | ![]() |
![]() |
![]() |
![]() |
4.5, 4.6 |
Initialize Cache | ![]() |
![]() |
![]() |
![]() |
4.1, 4.2, 4.5, 4.6 |
To re-initialize the Virtual Application Cache, you set the “State” value to 0 (Zero) and reboot the Client machine
This forces to re-create the Client Cache. All previously cached applications are erased from the cache and have to be re-loaded. Application Records, Shortcuts and User settings are not affected.
The App-V Blog gives a more detailed description at http://blogs.technet.com/appv/archive/2007/11/14/softgrid-operations-guide-part-2.aspx, also you may refer to Microsoft’s KB article at http://support.microsoft.com/?scid=kb%3Ben-us%3B931575&x=21&y=12.
Of course Ment’s Application Virtualization Client Diagnostics and Configuration tool described at http://www.softgridblog.com/?p=114 also is capable of resetting the cache.
Depending on the App-V Client Version, the “State” value is located in the follwoing Registry Keys:
App-V 4.5/4.6, 64 Bit: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\SoftGrid\4.5\Client\AppFS
App-V 4.5/4.6, 32 Bit: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SoftGrid\4.5\Client\AppFS
SoftGrid 4.2/4.2: HKEY_LOCAL_MACHINE\SOFTWARE\Softricity\SoftGrid Client\CurrentVersion\AppFS\
Hi Kirx,
thank for your blog.
Where can I get the informations about the API of App-V Virtual File System Drive ?
Thank you in advance and Best regards
Mai
Comment by Mai — March 1, 2011 @ 17:21
Hi,
actually, Microsoft did not disclose any relevant information about App-V’s APIs. I got the information about the cache behaviour from a Microsoft employee. I know that many of us would like to see the APIs published. It seems that Microsoft wanted to develop/publish an SDK once (back in 2008), but I never heard of this again…
Falko
Comment by kirxblog — March 2, 2011 @ 23:55
[…] The actual change of the App-V cache is not done through PowerShell itself but set using the Microsoft appvcachesize.exe utility. I used this utility based on the explanations provided in the blog post from Kirx About the App-V Client Cache size not being (fully) controlled by the Registry Value FileSize […]
Pingback by PowerShell Script–Set App-V 4.6 Cache Size | Anything about IT — November 29, 2013 @ 19:15