Icon's

So a few weeks back I was asked this question......

"We have users that have SoftGrid icon caches growing rather than being cleared out. "%APPDATA%\Softgrid Client\Icon Cache". Not sure why, but unchecked, we'll have thousands of ICO files for each user soon."

Its an interesting question and had an interesting answer of the back of it.

Global Icon Cache (Vista)

There are multiple icon caches. The global one holds icons for machine-wide items, like shortcuts on the common desktop or global file type associations. This is located under (%public%\Documents\SoftGrid Client\Icon Cache) .

The user-specific one is for user-specific icons, like the icons for shortcuts in a user’s profile or personal file type associations. These by User-Specific (Vista) default are located under (%appdata%\SoftGrid Client\Icon Cache). If you use the same icon both ways, it will show up in both places. For instance, if you set up a global file type association that uses the Word icon and publish a shortcut to Word on your personal desktop, you’ll see that Word icon in both caches. This is by design.

Also, if you remove an application or shortcut or FTA or anything else that might have an icon associated with it, the SoftGrid application does not remove the icon from the icon cache. The reasoning is that icons are generally small, this is an uncommon thing to do, and you could be using the icon for something else, like a shortcut you published outside of SoftGrid (maybe you just really liked the icon or something). So in some cases this may be the cause of icon cache growth, if customers add and remove a lot of apps with different icons, and you might have to find some way to manually clean those icons up (write a scrip/logon etc) if it’s really a problem alternatively they can raise a case with PSS call to assist in a script.

When it’s trying to figure out if two files represent the same icon, the client just looks at the path the icon came from. It doesn’t try to compare the actual bitmaps. So if you put the same icon in multiple places (e.g. \\server\share\first-copy-of-icon.ico and \\server\share\second-copy-of-same-icon.ico), you’ll end up with duplicates in the icon cache directory on the client.

To put things into a bit of perspective I have approximately 400 or so SoftGrid Applications running on my Vista Client (A lot I know!!!), this equates to around 393 icon files that reside in my user specific icon cache..... this also equals around 14.6MBs..... but I can live with this and if I wanted to amend this I could write a script to clean my icon cache up :)