To make /tmp a ramdisk, add something like
tmpfs   /tmp         tmpfs   nodev,nosuid,size=2G          0  0
or
tmpfs   /www/cache    tmpfs  rw,size=1G,nr_inodes=5k,noexec,nodev,nosuid,uid=648,gid=648,mode=1700   0  0
to /etc/fstab. (These examples from the https://wiki.archlinux.org/index.php/Tmpfs).

From the command line, to make a tmpfs in tmpdir, use

sudo mount -t tmpfs tmpfs tmpdir -o nodev,nosuid,size=2G