Which parts of the cpu is most important for cpu mining? Amount of cores? Amoung of cache? Core ghz speed?
For Cryptonight it's the core count, not really IPC performance. FX-8350 eats every i7 for breakfast.
But coins like Verium have very similar performance on a 16 core Ryzen 7, and a 8 core i7 7700K. Depends on algo.
If you want to buy a ton of CPUs for mining Cryptonight, then it's much better to build a 12 or 13 card RX560 rig with some cheap Celeron.
A moded RX560 gives about 550H\s, same as the Ryzen, and you can calculate the price difference yourself. Also for every CPU you need a MB, RAM and Power Supply.
CPU mining is just good for fun or some little extra income. Verium for example is mined via some ARM based boards, and they are cheap compared to any powerful CPU today. So go that way if you want to mine coins like Verium, or maybe Magi.