Seems like you're looking for something like this : http://wiki.centos.org/TipsAndTricks/TmpOnTmpfs
Instead of /tmp like in the setup, use /var/ramdisk, etc.
tmpfs will still used cached memory, and after creating it and mounting, you only need to set a flag in my.cnf to use the tmpdir flag...