Where do applications store local settings? Where does OS X store local settings for applications such as license keys, Skype favorite contacts, etc.  

Yesterday I was troubleshooting an issue with an Apple rep and he had me delete a bunch of files and folders, one of which includes ~/library/caches/*  I can't remember the rest though.  Later I noticed NONE of my programs would launch because they required license keys to be input.  All of my EyeTV scheduled recordings were gone. Dock preferences were reset. It's been a nightmare.

If I can get the location of these files, I can just recover them from Time Machine.
Applications store their data in any or all of the following locations:

 ~/&lt;individual application folders&gt;
 ~/Documents/&lt;individual application folders&gt;
 ~/Library/&lt;individual application folders&gt;
 ~/Library/Caches/*/&lt;individual application folders&gt;
 ~/Library/Preferences/*/&lt;individual application folders&gt;
 ~/Library/Application\ Support/&lt;individual application folders&gt;
 /Library/&lt;individual application folders&gt;
 /Library/Caches/*/&lt;individual application folders&gt;
 /Library/Preferences/*/&lt;individual application folders&gt;
 /Library/Application\ Support/&lt;individual application folders&gt;
 /private/tmp/&lt;esoterically named folders&gt;
 /private/var/tmp/*/&lt;esoterically named folders&gt;
 /private/var/db/receipts/


Also, it is not unheard of for an application to store data within its own application folder structure.



Please note that Time Machine does not backup everything. It will automatically exclude such things as iOS device backups among other items such as caches, logs, and what's in the Trash. You can view what is excluded by Time Machine automatically with this command:

 cat /System/Library/CoreServices/backupd.bundle/Contents/Resources/StdExclusions.plist