I always do this way: boot to twrp, wipe cache and dalvik in advanced wipe menu, reboot to recovery, install rom, and wipe cache and dalvik again by the appearing button after installation. I am sure it is more than enough but I play safe :) Never had problems because of wipes.