Safari: Empty cache

This dirty little trick will empty Safari’s cache, whether Safari is running or not. (Requires UI scripting enabled.)

--Empty Safari's cache
tell application "System Events"
tell application "Safari" to activate
tell process "Safari" to keystroke "e" using command down & option down
delay 1
keystroke return
end tell