Does SSH on Mac keep a local cache of data? If I'm say, editing a file in VIM, the state of the remote machine needs to be sent to my Mac. I know that browsers cache images and such. Does SSH do the same? Are there any programs for Mac that do that? Would I be able to use that data to recover remote files?
SSH simply allows you to use a shell (command line) on a remote machine; it doesn't cache the data that you access.

If you're looking for a solution to back up files from another machine, and Time Machine isn't what you want, perhaps check out rsync.