For temporary files that are written and read a lot, like build output or a transcode cache, a folder in memory is much faster than a disk and saves wear on an SSD. tmpfs gives you that in one command.
mkdir -p /mnt/scratch
mount -t tmpfs -o size=512M,mode=1777 tmpfs /mnt/scratch
df -h /mnt/scratch
size=512M is a cap, not a reservation. The tmpfs man page explains that memory is only used for what you actually store, so an empty tmpfs costs almost nothing. mode=1777 gives the folder the same permissions as /tmp, so everybody can write but nobody can delete files of others.
If you need more room later, you can resize it while it is mounted, without losing files:
mount -o remount,size=1G /mnt/scratch
For a permanent mount, add a line to /etc/fstab:
tmpfs /mnt/scratch tmpfs size=512M,mode=1777 0 0
Everything in a tmpfs is gone after a reboot or an unmount. That is the point, but never put anything there you want to keep. Without a size, the default cap is half of your RAM, and a full tmpfs competes with your programs for memory; under pressure its contents can be pushed to swap. I would always set a size that fits comfortably next to what the machine needs to run.
Further reading: tmpfs(5) manual page, mount(8) manual page