I was going to write a short post regarding the discovery of more junk deposited on my hard drive, this time by Apple (see iTunes: Photo sync creates iPod Photo Cache folder), therefore inflating my backups, when I realized that I had not described my resolution in detail in my earlier post about Vista backups, which was already long in the tooth. My iPod Photo Cache folder is a mere 247 MB. What’s wrong in keeping a couple hundred megabytes hostage between friends? Once again, this does not count the loss (in both time and space) incurred during backups.
Searching the registry for this location does not yield any useful results, so we may not be able to solve it as in the Google Earth case.
I have decided to solve this as in the Picasa case. Since Picasa did not seem to allow the user to relocate its db3 cache folder, I had created a Directory Junction pointing to an area which is on a different drive altogether and excluded from backup. These days on Windows there are at least four different ways of creating file system items pointing to other file system items: shortcuts (a.k.a. shell links), and then hard links, junctions, and symbolic links. Shortcuts are a close imitation of the venerable Macintosh System 7 aliases. Junctions have been around since Windows 2000/XP. (See Junction Disfunction for some history.) Interestingly, junctions will behave unexpectedly when manipulated by the user in Explorer in 2000/XP/2003, so Microsoft revised their behavior in Vista/7.
I was not really looking forward to the next case to be resolved via mklink /J, but it does work with a few caveats. First off, using a plain old shortcut (shell link) does not work — this is a bug in iTunes (220.127.116.11 as of this writing) for Windows. Second, simply creating a junction to an empty location somewhere else will not work, as iTunes blows away the junction and replaces it with its own local folder (this is another bug). Most likely iTunes is looking for the Photo Database file inside this special folder: so you need to sync a small amount of pictures first, move all the generated files to the intended final location, and only then create the junction pointing to it.