I am using an external drive for the AE Cache. Rarely does the Cache have to carry over from session to session. SInce I often have different drives I am continually resetting this via preferences. One solution is to replace the preferences file. The other solution would be to somehow script this change in the file
------- Here is sample Cache Adobe After Effects 11.0-x64 Prefs
["Disk Cache Controls"]
"Enabled 2" = "1"
"Folder 6" = "/Volumes/1TB_NO_useAT_AET/ AE_CACHE/AE1"
"Max Size 3" = "46"
--------------------I want to change ------------------
"Folder 6" = "/Volumes/1TB_NO_useAT_AET/ AE_CACHE/AE1"
TO
"Folder 6" = "/Volumes/hyenna/ AE_CACHE/AE1"

this copies the old prefs file to a new prefs file through the sed command which replaces any line it finds that starts with "Folder 6 = " with line you want, then backs up your old prefs to the desktop and moves the new hacked prefs file to the original location. Obviously you have to fill in the paths yourself (it's easiest to just drop the files on the terminal window to get the paths).