from a question on askubuntu.com
you can use /dev/shm (default tmpfs device on unix)
you can do something like this in your ~/.xprofile :
#!/bin/sh
rm -rf /dev/shm/${USER}cache
mkdir /dev/shm/${USER}cache
chmod 700 /dev/shm/${USER}cache
rm -rf /home/${USER}/.cache
ln -s /dev/shm/${USER}cache /home/${USER}/.cache